wok annotate syslinux/stuff/iso2exe/init.custom @ rev 20771

cpige: add man page for cook.slitaz.org
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Feb 13 16:56:42 2019 +0100 (23 months ago)
parents 37bef16b6789
children 02c70d036ea0
rev   line source
pascal@19450 1 #!/bin/sh
pascal@19450 2
pascal@19450 3 if [ "$1" == "loramhack" ]; then
pascal@19450 4 cp $0 $2/init.extra
pascal@19450 5 sed -i 's|^exec |exec /sbin|' $2/init.extra
pascal@20771 6 cp -a /extra/. $2
pascal@19450 7 exit
pascal@19450 8 fi
pascal@19450 9 if [ -d /etc ]; then
pascal@19450 10 [ -d /extra ] && cp -a /extra/. / && rm -rf /extra
pascal@19450 11 for i in /init.d/* ; do
pascal@19450 12 [ -f $i ] && echo "=== $(date) $i === " && . $i
pascal@19450 13 done 2>&1 | tee /var/log/init.log
pascal@19450 14 else
pascal@19450 15 sed -i -e 's|fail 2mDone|&\n '$0' loramhack /mnt$4|' \
pascal@19450 16 -e 's| /sbin/init| /init.extra|' /init
pascal@19450 17 fi
pascal@19450 18
pascal@19450 19 exec /init "$@"