diff --git a/README.md b/README.md index 9a1e546..4afcbbb 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,9 @@ below. To install the required dependencies for `pi-gen` you should run: ```bash -apt-get install coreutils quilt parted qemu-user-static debootstrap zerofree zip \ +apt install coreutils quilt parted qemu-user-static debootstrap zerofree zip \ dosfstools e2fsprogs libarchive-tools libcap2-bin grep rsync xz-utils file git curl bc \ -gpg pigz xxd arch-test bmap-tools +gpg pigz xxd arch-test bmap-tools kmod ``` The file `depends` contains a list of tools needed. The format of this @@ -174,6 +174,8 @@ The following environment variables are supported: a name chosen by the final user. This security feature is designed to prevent shipping images with a default username and help prevent malicious actors from taking over your devices. + If the FIRST_USER_NAME is set to `pi` and no `FIRST_USER_PASS` is set, the setup wizard will be launched on first boot to allow the user to set the password. + * `FIRST_USER_PASS` (Default: unset) Password for the first user. If unset, the account is locked. diff --git a/build.sh b/build.sh index 343a764..6be9466 100755 --- a/build.sh +++ b/build.sh @@ -68,6 +68,8 @@ EOF log "Begin ${SUB_STAGE_DIR}/${i}-run.sh" ./${i}-run.sh log "End ${SUB_STAGE_DIR}/${i}-run.sh" + elif [ -f ${i}-run.sh ]; then + log "Skip ${SUB_STAGE_DIR}/${i}-run.sh (not executable)" fi if [ -f ${i}-run-chroot.sh ]; then log "Begin ${SUB_STAGE_DIR}/${i}-run-chroot.sh" diff --git a/stage1/01-sys-tweaks/00-run.sh b/stage1/01-sys-tweaks/00-run.sh index e024701..b7e5b5e 100755 --- a/stage1/01-sys-tweaks/00-run.sh +++ b/stage1/01-sys-tweaks/00-run.sh @@ -12,5 +12,3 @@ if [ -n "${FIRST_USER_PASS}" ]; then fi echo "root:root" | chpasswd EOF - - diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh index 93bc36d..be0e8cd 100755 --- a/stage2/01-sys-tweaks/01-run.sh +++ b/stage2/01-sys-tweaks/01-run.sh @@ -30,6 +30,7 @@ on_chroot <