mirror of https://github.com/OpenIPC/firmware.git
overlay: add rc.local capability
Improved Startup with rc.local Scripts. Added S99rc.local to /etc/init.d/ and created /etc/rc.local. This lets users easily run their own commands at the end of startup. It's a straightforward way to customize and optimize the system's start-up process.pull/964/head
parent
07f1789789
commit
e47ef966d6
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Start rc.local
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
start() {
|
||||||
|
printf "Starting rc.local"
|
||||||
|
/etc/rc.local
|
||||||
|
}
|
||||||
|
|
||||||
|
restart() {
|
||||||
|
printf "Restarting rc.local"
|
||||||
|
/etc/rc.local
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
"$1"
|
||||||
|
;;
|
||||||
|
|
||||||
|
restart|reload)
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|restart|reload}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $?
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/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.
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in New Issue