3 # vrootdevices: setup vroot devices
6 # description: Setup vroot devices for use inside vservers
10 # Source function library
11 . /etc/rc.d/init.d/functions
15 cat /etc/sysconfig/vrootdevices | egrep -v '^ *#' | while read VROOT BLOCK; do
16 if [ -n "$VROOT" -a -n "$BLOCK" ]; then
17 if [ -d /dev/vroot ]; then
18 VROOT="/dev/vroot/$VROOT"
20 VROOT="/dev/vroot$VROOT"
22 show "$(nls "Assigning device: %s --> %s" "$VROOT" "$BLOCK")"
24 vrsetup $VROOT $BLOCK > /dev/null
32 cat /etc/sysconfig/vrootdevices | egrep -v '^ *#' | while read VROOT BLOCK; do
33 if [ -n "$VROOT" -a -n "$BLOCK" ]; then
34 if [ -d /dev/vroot ]; then
35 VROOT="/dev/vroot/$VROOT"
37 VROOT="/dev/vroot$VROOT"
39 show "$(nls "Removing assignment: %s --> %s" "$VROOT" "$BLOCK")"
41 vrsetup -d $VROOT > /dev/null
48 if [ ! -f /var/lock/subsys/vrootdevices ]; then
49 msg_starting vrootdevices
52 touch /var/lock/subsys/vrootdevices
54 msg_already_running vrootdevices
59 if [ -f /var/lock/subsys/vrootdevices ]; then
60 msg_stopping vrootdevices
63 rm -f /var/lock/subsys/vrootdevices >/dev/null 2>&1
65 msg_not_running vrootdevices
81 echo "There is no way to tell"
84 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"