1
0
Fork 0
mirror of https://github.com/RobotechLille/cdf2018-principal synced 2024-11-22 16:16:05 +01:00
cdf2018-principal/raspberrypi/board/robotech/cdfprincipal/rootfs_overlay/etc/init.d/S30hardware

40 lines
508 B
Bash
Executable file

#!/bin/sh
#
# Loads required hardware modules
#
start() {
printf "Starting hardware handling: "
modprobe cdc_acm # Arduino
modprobe pl2303 # USB↔Serial cable
# I2C
modprobe i2c-bcm2708 # RPi2
modprobe i2c-bcm2835 # RPi3
modprobe i2c-dev # Both
/opt/chef/lcdOff.sh
echo "OK"
}
stop() {
printf "Stopping hardware handling: "
echo "OK"
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?