mirror of
https://git.busybox.net/buildroot.git
synced 2024-12-14 07:43:32 +08:00
5c06c05a4a
This commit fixes the init script to use the correct FOO_INSTALL_INIT_SYSV hook. [Thomas: slightly reword commit log.] Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
32 lines
524 B
Bash
32 lines
524 B
Bash
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
[ -x /usr/sbin/dmraid ] || exit 0
|
|
|
|
# try to load module in case that hasn't been done yet
|
|
modprobe dm-mod >/dev/null 2>&1
|
|
|
|
case "$1" in
|
|
start|"")
|
|
echo "Setting up DMRAID devices..."
|
|
/usr/sbin/dmraid --activate yes --ignorelocking --verbose
|
|
;;
|
|
|
|
stop)
|
|
echo "Shutting down DMRAID devices... "
|
|
/usr/sbin/dmraid --activate no --ignorelocking --verbose
|
|
;;
|
|
|
|
restart|force-reload)
|
|
$0 stop
|
|
sleep 1
|
|
$0 start
|
|
;;
|
|
|
|
*)
|
|
echo "Usage: dmraid {start|stop|restart|force-reload}"
|
|
exit 1
|
|
;;
|
|
esac
|