3 # vrootdevices: setup vroot devices
6 # description: Setup vroot devices for use inside vservers
8 # Source function library
9 . /etc/rc.d/init.d/functions
13 cat /etc/sysconfig/vrootdevices | egrep -v '^ *#' | while read VROOT BLOCK; do
14 if [ -n "$VROOT" -a -n "$BLOCK" ]; then
15 if [ -d /dev/vroot ]; then
16 VROOT="/dev/vroot/$VROOT"
18 VROOT="/dev/vroot$VROOT"
20 show "$(nls "Assigning device: %s --> %s" "$VROOT" "$BLOCK")"
22 vrsetup $VROOT $BLOCK > /dev/null
30 cat /etc/sysconfig/vrootdevices | egrep -v '^ *#' | while read VROOT BLOCK; do
31 if [ -n "$VROOT" -a -n "$BLOCK" ]; then
32 if [ -d /dev/vroot ]; then
33 VROOT="/dev/vroot/$VROOT"
35 VROOT="/dev/vroot$VROOT"
37 show "$(nls "Removing assignment: %s --> %s" "$VROOT" "$BLOCK")"
39 vrsetup -d $VROOT > /dev/null
46 if [ ! -f /var/lock/subsys/vrootdevices ]; then
47 msg_starting vrootdevices
50 touch /var/lock/subsys/vrootdevices
52 msg_already_running vrootdevices
57 if [ -f /var/lock/subsys/vrootdevices ]; then
58 msg_stopping vrootdevices
61 rm -f /var/lock/subsys/vrootdevices >/dev/null 2>&1
63 msg_not_running vrootdevices
75 echo "There is no way to tell"
82 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"