slackbuilds_ponce/libraries/libldm/rc.ldm
Vijay Marcel 2fa2cab882
libraries/libldm: Added (Microsoft Windows Dynamic Disk Library)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2022-08-27 22:50:27 +07:00

44 lines
576 B
Bash

#! /bin/sh
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
NAME="ldm"
BIN=@bindir@/ldmtool
DESC="Windows Logical Disk Manager volumes"
# Exit if package not installed
[ -x "$BIN" ] || exit 0
ldm_start() {
echo "Starting $DESC"
$BIN create all
echo "Started $DESC"
}
ldm_stop() {
echo "Stopping $DESC"
$BIN remove all
echo "Stopped $DESC"
}
ldm_restart() {
ldm_stop
sleep 3
ldm Start
}
case "$1" in
'start')
ldm_start
;;
'stop')
ldm_stop
;;
'restart')
ldm_restart
;;
*)
echo "usage $0 start|stop|restart"
esac