Add new command and update startup scripts to use it Signed-off-by: Nicholas Mello <nick@nmello.dev>
31 lines
535 B
Bash
31 lines
535 B
Bash
#!/bin/sh
|
|
|
|
start() {
|
|
log -n "startup-scripts" "Probing gpio_keyboard_driver"
|
|
modprobe gpio_keyboard_driver
|
|
log -n "startup-scripts" "Probed gpio_keyboard_driver with exit code $?"
|
|
}
|
|
|
|
stop() {
|
|
log -n "startup-scripts" "Removing gpio_keyboard_driver"
|
|
rmmod gpio_keyboard_driver
|
|
log -n "startup-scripts" "Removed gpio_keyboard_driver with exit code $?"
|
|
}
|
|
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
restart)
|
|
stop
|
|
start
|
|
;;
|
|
*)
|
|
log -l error -n "startup-scripts" "Must be start, stop, or restart"
|
|
exit 1
|
|
;;
|
|
esac
|