From 7a44df3e37ee20b87372a34532c22074ce810d5e Mon Sep 17 00:00:00 2001 From: Braiden Vasco Date: Mon, 3 Jul 2017 10:50:08 +0000 Subject: [PATCH] Add separate file to install /etc/rc.local --- build.sh | 2 +- files/rc.local | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100755 files/rc.local diff --git a/build.sh b/build.sh index d5758b5..9dbbdde 100755 --- a/build.sh +++ b/build.sh @@ -156,7 +156,7 @@ mount --bind /dev/pts "$ROOTFS_DIR/dev/pts" mount -t proc /proc "$ROOTFS_DIR/proc" mount --bind /sys "$ROOTFS_DIR/sys" -echo 'resize2fs "$(findmnt / -o source -n)"' >> "$ROOTFS_DIR/rc.local" +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/" diff --git a/files/rc.local b/files/rc.local new file mode 100755 index 0000000..675e509 --- /dev/null +++ b/files/rc.local @@ -0,0 +1,17 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# Increase root file system size to take all available space. +resize2fs "$(findmnt / -o source -n)" + +exit 0