Add separate file to install /etc/rc.local
This commit is contained in:
parent
7e821b3740
commit
7a44df3e37
2 changed files with 18 additions and 1 deletions
2
build.sh
2
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/"
|
||||
|
|
17
files/rc.local
Executable file
17
files/rc.local
Executable file
|
@ -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
|
Reference in a new issue