arm-sdk

os build toolkit for various embedded devices
git clone https://git.parazyd.org/arm-sdk
Log | Files | Refs | Submodules | README | LICENSE

preinit (277B)


      1 #!/bin/sh
      2 
      3 watchdog_kick() {
      4 	while true; do
      5 		for wd in /dev/watchdog*; do
      6 			test -c $wd && echo X > $wd
      7 		done
      8 
      9 		if [ -f /bin/sleep ]; then
     10 			/bin/sleep 2
     11 		else
     12 			return 0
     13 		fi
     14 	done
     15 }
     16 
     17 test -c /dev/null || mknod -m 666 /dev/null c 1 3
     18 
     19 watchdog_kick &
     20 
     21 exec /sbin/init