mirror of
https://github.com/RobotechLille/cdf2018-principal
synced 2025-10-03 16:50:15 +02:00
Commit initial
This commit is contained in:
commit
e0cb79d1cc
57 changed files with 2128 additions and 0 deletions
41
raspberrypi/board/robotech/cdfprincipal/rootfs_overlay/etc/extra.d/S40wifi
Executable file
41
raspberrypi/board/robotech/cdfprincipal/rootfs_overlay/etc/extra.d/S40wifi
Executable file
|
@ -0,0 +1,41 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Connect to Wi-Fi network
|
||||
#
|
||||
|
||||
start() {
|
||||
printf "Starting Wi-Fi connection: "
|
||||
# modprobe brcmfmac
|
||||
modprobe r8188eu
|
||||
ip link set wlan0 up
|
||||
wpa_supplicant -D wext -B -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -P /var/run/wpa_supplicant.pid
|
||||
ifup wlan0
|
||||
echo "OK"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf "Stopping Wi-Fi connection: "
|
||||
start-stop-daemon -K -q -p /var/run/wpa_supplicant.pid
|
||||
ifdown wlan0
|
||||
# rmmod brcmfmac
|
||||
rmmod r8188eu
|
||||
echo "OK"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
27
raspberrypi/board/robotech/cdfprincipal/rootfs_overlay/etc/extra.d/rcK
Executable file
27
raspberrypi/board/robotech/cdfprincipal/rootfs_overlay/etc/extra.d/rcK
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
# Stop all init scripts in /etc/extra.d
|
||||
# executing them in reversed numerical order.
|
||||
#
|
||||
for i in $(ls -r /etc/extra.d/S??*) ;do
|
||||
|
||||
# Ignore dangling symlinks (if any).
|
||||
[ ! -f "$i" ] && continue
|
||||
|
||||
case "$i" in
|
||||
*.sh)
|
||||
# Source shell script for speed.
|
||||
(
|
||||
trap - INT QUIT TSTP
|
||||
set stop
|
||||
. $i
|
||||
)
|
||||
;;
|
||||
*)
|
||||
# No sh extension, so fork subprocess.
|
||||
$i stop
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
27
raspberrypi/board/robotech/cdfprincipal/rootfs_overlay/etc/extra.d/rcS
Executable file
27
raspberrypi/board/robotech/cdfprincipal/rootfs_overlay/etc/extra.d/rcS
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
# Start all init scripts in /etc/extra.d
|
||||
# executing them in numerical order.
|
||||
#
|
||||
for i in /etc/extra.d/S??* ;do
|
||||
|
||||
# Ignore dangling symlinks (if any).
|
||||
[ ! -f "$i" ] && continue
|
||||
|
||||
case "$i" in
|
||||
*.sh)
|
||||
# Source shell script for speed.
|
||||
(
|
||||
trap - INT QUIT TSTP
|
||||
set start
|
||||
. $i
|
||||
)
|
||||
;;
|
||||
*)
|
||||
# No sh extension, so fork subprocess.
|
||||
$i start
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Changes keyboard layout to AZERTY
|
||||
#
|
||||
|
||||
start() {
|
||||
printf "Starting AZERTY keyboard: "
|
||||
loadkmap < /usr/share/keyboard/fr-latin9.bmap
|
||||
echo "OK"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf "Stopping AZERTY keyboard: "
|
||||
echo "OK"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
38
raspberrypi/board/robotech/cdfprincipal/rootfs_overlay/etc/init.d/S50chef
Executable file
38
raspberrypi/board/robotech/cdfprincipal/rootfs_overlay/etc/init.d/S50chef
Executable file
|
@ -0,0 +1,38 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Start main program
|
||||
#
|
||||
|
||||
EXEC=$(which sh)
|
||||
PIDFILE=/var/run/chef.pid
|
||||
LOGFILE=/var/run/chef.log
|
||||
|
||||
start() {
|
||||
printf "Starting chef: "
|
||||
start-stop-daemon -p "$PIDFILE" -x "$EXEC" -b -m -S -- "/opt/chef/run.sh" -l "$LOGFILE"
|
||||
echo "OK"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf "Stopping chef: "
|
||||
start-stop-daemon -p "$PIDFILE" -x "$EXEC" -K
|
||||
echo "OK"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
37
raspberrypi/board/robotech/cdfprincipal/rootfs_overlay/etc/init.d/S90extra
Executable file
37
raspberrypi/board/robotech/cdfprincipal/rootfs_overlay/etc/init.d/S90extra
Executable file
|
@ -0,0 +1,37 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Start extra services when not in debug mode
|
||||
#
|
||||
|
||||
start() {
|
||||
printf "Starting extra services: "
|
||||
if ! /opt/cdf/bin/testpin 0 1
|
||||
then
|
||||
/etc/extra.d/rcS
|
||||
fi
|
||||
echo "OK"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf "Stopping extra services: "
|
||||
/etc/extra.d/rcK
|
||||
echo "OK"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
Loading…
Add table
Add a link
Reference in a new issue