mirror of
https://git.busybox.net/buildroot.git
synced 2024-11-23 13:33:28 +08:00
e72bb38b9d
The test doesn't make sense. It just exits without any error if the binary doesn't exist, which is silly. Signed-off-by: Carlos Santos <casantos@datacom.ind.br> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
30 lines
489 B
Bash
30 lines
489 B
Bash
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
# 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
|