Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #
- # DESCRIPTION
- # master "post-boot" script for Asus wl500g router.
- #
- # Starts Sxx_... scripts on "post-boot" event
- # in numerical order
- #
- #
- # INSTRUCTIONS
- # Put script in "/usr/local/sbin"
- # Save flashfs:
- # flashfs save && flashfs commit && flashfs enable
- # Reboot device
- # reboot
- # Log to stderr as well as the system log
- LOGGER_OPTIONS=-s
- # Delay in seconds before next script start
- DELAY=2
- logger $LOGGER_OPTIONS "Starting post-boot scripts..."
- for i in /usr/local/sbin/S??*
- do
- # ignore dangling symlinks (if any)
- [ ! -f "$i" ] && continue
- logger $LOGGER_OPTIONS "Starting <$i> script..."
- $i &
- sleep $DELAY
- done
- logger $LOGGER_OPTIONS "All post-boot scripts were started"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement