diff --git a/build.sh b/build.sh index a3d5b07..8af4a1e 100755 --- a/build.sh +++ b/build.sh @@ -49,7 +49,7 @@ dependencies_check() { fi } -on_chroot() { +chroot_rootfs() { local proc_fs="$ROOTFS_DIR/proc" local dev_fs="$ROOTFS_DIR/dev" local devpts_fs="$ROOTFS_DIR/dev/pts" @@ -165,21 +165,21 @@ fi install -m 644 files/sources.list "$ROOTFS_DIR/etc/apt/" install -m 644 files/raspi.list "$ROOTFS_DIR/etc/apt/sources.list.d/" -on_chroot apt-key add - < files/raspberrypi.gpg.key +chroot_rootfs apt-key add - < files/raspberrypi.gpg.key -on_chroot << EOF +chroot_rootfs << EOF apt-get update apt-get dist-upgrade -y EOF -on_chroot << EOF +chroot_rootfs << EOF debconf-set-selections <>"$ROOTFS_DIR/etc/hosts" -on_chroot << EOF +chroot_rootfs << EOF if ! id -u $USERNAME >/dev/null 2>&1; then adduser --disabled-password --gecos "" $USERNAME fi @@ -211,19 +211,19 @@ echo "$USERNAME:$PASSWORD" | chpasswd passwd -d root EOF -on_chroot << EOF +chroot_rootfs << EOF dpkg-divert --add --local /lib/udev/rules.d/75-persistent-net-generator.rules EOF touch "$ROOTFS_DIR/spindle_install" -on_chroot << EOF +chroot_rootfs << EOF apt-get install -y raspi-copies-and-fills EOF rm -f "$ROOTFS_DIR/spindle_install" -on_chroot << EOF +chroot_rootfs << EOF debconf-set-selections <