From f819b8160603a6e23a6b9ae91fa6080e6b65e63b Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 16 Jan 2021 08:40:30 -0500 Subject: installer/pc: Make functions "public" --- diff --git a/src/installer/pc.sh b/src/installer/pc.sh index ce1b898..43006f5 100644 --- a/src/installer/pc.sh +++ b/src/installer/pc.sh @@ -18,7 +18,7 @@ # along with the ProteanOS Development Kit. If not, see # . -_installer_pc_log_print() +installer_pc_log_print() { local prefix="${1}" local log="${2}" @@ -32,7 +32,7 @@ _installer_pc_log_print() unset IFS } -_installer_pc_make_partition_and_fs() +installer_pc_make_partition_and_fs() { local dev="${1}" shift 1 @@ -41,7 +41,7 @@ _installer_pc_make_partition_and_fs() info "$(get_msg 'installer_pc_dd')" if ! log="$(dd if=/dev/zero of="${dev}" bs=512 count=1 2>&1)"; then error "$(get_msg 'installer_pc_dd_fail')" - _installer_pc_log_print 'dd' "${log}" + installer_pc_log_print 'dd' "${log}" return 1 fi @@ -50,14 +50,14 @@ _installer_pc_make_partition_and_fs() if ! log="$(printf ',,83,*\n' | ${SFDISK} -- "${dev}" 2>&1)" then error "$(get_msg 'installer_pc_fdisk_fail')" - _installer_pc_log_print 'sfdisk' "${log}" + installer_pc_log_print 'sfdisk' "${log}" return 1 fi elif ${HAVE_FDISK}; then if ! log="$(printf 'n\np\n1\n\n\nt\n83\na\n1\nw\n' | ${FDISK} -- "${dev}" 2>&1)"; then error "$(get_msg 'installer_pc_fdisk_fail')" - _installer_pc_log_print 'fdisk' "${log}" + installer_pc_log_print 'fdisk' "${log}" return 1 fi fi @@ -65,7 +65,7 @@ _installer_pc_make_partition_and_fs() info "$(get_msg 'installer_pc_mkfs')" if ! log="$(${MKE2FS} -t ext4 -- "${dev}1" 2>&1)"; then error "$(get_msg 'installer_pc_mkfs_fail')" - _installer_pc_log_print 'mke2fs' "${log}" + installer_pc_log_print 'mke2fs' "${log}" return 1 fi @@ -84,7 +84,7 @@ installer_pc_main() return 1 fi - if ! _installer_pc_make_partition_and_fs "${dev}"; then + if ! installer_pc_make_partition_and_fs "${dev}"; then return 1 fi if ! root="$(block_mount "${dev}1")"; then -- cgit v0.9.1