tinit: make rc script container-aware - mkports - recipes for building multiple softwares with mk(1)
 (HTM) git clone git://z3bra.org/mkports
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit c1b57dd0e94b3d8b3e40a4ac921f1f4a32f78b8d
 (DIR) parent 16be32f73fb287339a470f00604e3fd3b057684a
 (HTM) Author: z3bra <willyatmailoodotorg>
       Date:   Mon,  1 Feb 2016 20:54:28 +0100
       
       init: make rc script container-aware
       
       Diffstat:
         M init/rc                             |      27 ++++++++++++++-------------
       
       1 file changed, 14 insertions(+), 13 deletions(-)
       ---
 (DIR) diff --git a/init/rc b/init/rc
       t@@ -4,23 +4,24 @@ umask 022
        
        echo
        echo
       -echo booting your setup
       -echo
       +echo booting \$distro
        echo
        
       -/bin/ctrlaltdel -s
       +if [ -z "$container" ]; then
       +        /bin/ctrlaltdel -s
        
       -echo mounting virtual filesystem 
       -/bin/mount -n -t proc  -o nosuid,noexec,nodev proc /proc
       -/bin/mount -n -t sysfs -o nosuid,noexec,nodev sys /sys
       -/bin/mount -n -t tmpfs -o nosuid,mode=0755 dev /dev
       +        echo mounting virtual filesystem 
       +        /bin/mount -n -t proc  -o nosuid,noexec,nodev proc /proc
       +        /bin/mount -n -t sysfs -o nosuid,noexec,nodev sys /sys
       +        /bin/mount -n -t tmpfs -o nosuid,mode=0755 dev /dev
        
       -/bin/mkdir -p /dev/pts /dev/shm
       -/bin/mount -n -t devpts -o gid=5,mode=0620 devpts /dev/pts
       -/bin/mount -n -t tpmfs  -o mode=1777,nosuid,nodev shm /dev/shm
       +        /bin/mkdir -p /dev/pts /dev/shm
       +        /bin/mount -n -t devpts -o gid=5,mode=0620 devpts /dev/pts
       +        /bin/mount -n -t tpmfs  -o mode=1777,nosuid,nodev shm /dev/shm
        
       -echo remouting / read-only
       -/bin/mount -o remount,ro /
       +        echo remouting / read-only
       +        /bin/mount -o remount,ro /
       +fi
        
        echo running smdev
        /bin/smdev -s
       t@@ -46,6 +47,6 @@ echo remounting / read-write
        /bin/mount -o remount,rw /
        
        echo
       -/bin/respawn /bin/getty /dev/tty0 &
        /bin/respawn /bin/getty /dev/tty1 &
        /bin/respawn /bin/getty /dev/tty2 &
       +/bin/respawn /bin/getty /dev/tty3 &