From f93854a2c4e4a330780941ea4ef890102343f8f1 Mon Sep 17 00:00:00 2001 From: Braiden Vasco Date: Tue, 4 Jul 2017 13:39:31 +0000 Subject: [PATCH] Rename function "chroot_rootfs" to "on_chroot" --- build.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/build.sh b/build.sh index e69ff09..a15bfe2 100755 --- a/build.sh +++ b/build.sh @@ -49,7 +49,7 @@ dependencies_check() { fi } -chroot_rootfs() { +on_chroot() { capsh --drop=cap_setfcap "--chroot=$ROOTFS_DIR/" -- "$@" } @@ -179,9 +179,9 @@ install -m 755 files/rc.local "$ROOTFS_DIR/etc/rc.local" install -m 644 files/sources.list "$ROOTFS_DIR/etc/apt/" install -m 644 files/raspi.list "$ROOTFS_DIR/etc/apt/sources.list.d/" -chroot_rootfs apt-key add - < files/raspberrypi.gpg.key +on_chroot apt-key add - < files/raspberrypi.gpg.key -chroot_rootfs << EOF +on_chroot << EOF apt-get update apt-get dist-upgrade -y EOF @@ -189,14 +189,14 @@ EOF ## # Common system configuration. # -chroot_rootfs << EOF +on_chroot << EOF debconf-set-selections <>"$ROOTFS_DIR/etc/hosts" -chroot_rootfs << EOF +on_chroot << EOF if ! id -u $USERNAME >/dev/null 2>&1; then adduser --disabled-password --gecos "" $USERNAME fi @@ -227,19 +227,19 @@ echo "$USERNAME:$PASSWORD" | chpasswd passwd -d root EOF -chroot_rootfs << EOF +on_chroot << EOF dpkg-divert --add --local /lib/udev/rules.d/75-persistent-net-generator.rules EOF touch "$ROOTFS_DIR/spindle_install" -chroot_rootfs << EOF +on_chroot << EOF apt-get install -y raspi-copies-and-fills EOF rm -f "$ROOTFS_DIR/spindle_install" -chroot_rootfs << EOF +on_chroot << EOF debconf-set-selections <