home · contact · privacy
Minor code-style improvements.
authorPlom Heller <plom@plomlompom.com>
Mon, 7 Sep 2026 03:18:53 +0000 (05:18 +0200)
committerPlom Heller <plom@plomlompom.com>
Mon, 7 Sep 2026 03:18:53 +0000 (05:18 +0200)
setup_scripts/chrooted_command.sh
setup_scripts/install_debian.sh
setup_scripts/setup_luksvg.sh
setup_scripts/start_root.sh
setup_scripts/start_user.sh

index 9c1f74f162b378d04114963b48fd74db17e2295e..26a987a95e08efc1017147d26dea5603e5c74809 100755 (executable)
@@ -22,11 +22,11 @@ mount_privately "${PATH_VG_ROOT}" "${PATH_MNT_ROOT}"
 rbind_mnt
 
 # enact command
-RC=0
-chroot_sh "${COMMAND}" || RC=$?
+RETURN_CODE=0
+chroot_sh "${COMMAND}" || RETURN_CODE=$?
 
 # clean up mounts
 unmount_unrbind
 close_luksvg
-msg 'Finished! (command exit status: %s)' "${RC}"
-exit "${RC}"
+msg 'Finished! (command exit status: %s)' "${RETURN_CODe}"
+exit "${RETURN_CODE}"
index 5ef5ed9b6052c87d163b45671b66ddc4317df00c..6c9a05faa8b021c281ad2e036e0c2a0b61215e82 100755 (executable)
@@ -51,7 +51,6 @@ efibootmgr \
     | grep -Fxq "${NAME_BOOT}"\
     && error "an EFI boot entry named '${NAME_BOOT}' already exists"
 
-# run inputs by user and ask for confirmation
 msg 'Your installation choices:'
 msg '- target partition: [ %s ]' "${PARTITION}"
 msg '- name for new boot option: [ %s ]' "${NAME_BOOT}"
@@ -69,30 +68,25 @@ msg 'Installing Debian Suite "%s" there via debootstrap …' "${DEB_SUITE}"
 debootstrap "${DEB_SUITE}" "${PATH_MNT_ROOT}"
 rbind_mnt
 
-# set up minimal fstab
-msg 'Writing fstab …'
+msg 'Setting up fstab …'
 cat <<EOF >| "${PATH_MNT_FSTAB}"
 ${PATH_VG_ROOT} / ext4 errors=remount-ro 0 1
 ${PATH_VG_DATA} /${NAME_DATA} ext4 errors=remount-ro 0 2
 ${PATH_VG_SWAP} none swap sw 0 0
 EOF
 
-# set up crypttab
-msg 'Writing crypttab …'
+msg 'Setting up crypttab …'
 printf '%s UUID=%s none luks\n' \
     "${NAME_LUKSVG}" "$(cryptsetup luksUUID "${PARTITION}")" \
     >| "${PATH_MNT_CRYPTTAB}"
 
-# enable non-free-firmware component for firmware-iwlwifi below (as debootstrap
-# only enables "main" by default)
+# for firmware-iwlwifi below (as debootstrap only enables "main" by default)
 msg 'Enabling non-free-firmware component in target sources.list …'
 sed -i 's/ main$/ main non-free-firmware/' "${PATH_MNT_APT_SOURCES}"
 
-# reduce installation footprint
 msg 'Disabling automatic installation of APT recommends …'
 printf 'APT::Install-Recommends "false";\n' >| "${PATH_MNT_APT_NORECOMMENDS}"
 
-# set up kernel, initrd etc.
 msg 'Into chroot environment installing LVM tools, kernel, initrd etc. …'
 chroot_sh "apt-get -qq update"
 chroot_sh \
@@ -136,7 +130,6 @@ method=auto
 EOF
 chmod 600 "${PATH_MNT_NM_CONN}"
 
-# install kernel and initrd into EFI tree/vars
 msg 'EFI setup: copying kernel and initrd into %s …' "${PATH_EFI_NAME_BOOT}"
 mkdir "${PATH_EFI_NAME_BOOT}"
 for FILENAME in "${FNAME_INITRD}" "${FNAME_VMLINUZ}"; do
@@ -156,7 +149,7 @@ efibootmgr \
 msg 'Setting up root login …'
 chroot_sh "passwd"
 
-# clean up mounts
+# clean up
 unmount_unrbind
 close_luksvg
 msg 'Finished!'
index 3cbc5085cd5e3d8db0f7fdf27ed1f5fb25e3145b..8127571ae7fb8f7ba565fe872b5d0054b1c1f056 100755 (executable)
@@ -25,8 +25,7 @@ msg_nonl 'To continue, type "YES!" (all caps, exclamation mark, no quotes): '
 read -r CONFIRM; [ "${CONFIRM}" = 'YES!' ]\
     || die 'ABORTED: expected confirmation not given.'
 
-# encrypt partition
-msg 'Formatting %s as LUKS container …' "${PARTITION}"
+msg 'Encrypting %s as LUKS container …' "${PARTITION}"
 cryptsetup luksFormat --batch-mode "${PARTITION}"
 open_luksvg "${PARTITION}"
 
index 75d529f467322ce06a8cb198651b14e82cdb91a3..2e13e68257c64fbd562363c11fe7eddb829d990c 100755 (executable)
@@ -19,8 +19,6 @@ TLP_THRESH_STOP=80
 # constants derived from changeables
 PATH_TO_COPY="${PATH_REPO}/to_copy"
 
-augment_profile
-
 msg 'Ensuring packages: %s' "${TO_INSTALL}"
 apt-get -y update
 apt-get -y install ${TO_INSTALL}
@@ -53,3 +51,5 @@ usermod -a -G sudo,video "${USERNAME}"
 
 msg 'Synchronizing clock …'
 ntpdate-debian
+
+augment_profile
index be0e9197e9a3c41665bffef3643ae66e9af96c5d..ccb3f547a17064dcc123c0b43bab59193334d57d 100755 (executable)
@@ -5,7 +5,6 @@
 PATH_SKEL_USER="${PATH_REPO}/home_user"
 
 augment_profile
-
 msg 'Linking %s files into home directory …' "${PATH_SKEL_USER}"
 find "${PATH_SKEL_USER}" -mindepth 1 -maxdepth 1\
     -exec ln -v -s {} "${HOME}/" \;