]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
make lxc behave same as vserver
authorElan Ruusamäe <glen@delfi.ee>
Mon, 18 Nov 2013 21:16:50 +0000 (23:16 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 18 Nov 2013 21:16:50 +0000 (23:16 +0200)
this probably deserves config variable for cases where people do want to
mount or configure network inside container

rc.d/init.d/netfs
rc.d/rc.sysinit

index 0552d33826653c9f29347331995dc235ee2dbe19..ef869e05f551ed648c766c808c67f734c4fef13a 100755 (executable)
@@ -15,7 +15,7 @@
 . /etc/rc.d/init.d/cryptsetup
 . /etc/sysconfig/network
 
-if is_yes "$VSERVER"; then
+if is_yes "$VSERVER" || [[ "$container" = lxc* ]]; then
        exit 0
 fi
 
index 1b81dce1bba25b5974e607caa538814d4a326fe6..ee8041c5349b60e852c02a2f166b5443da5e11b9 100755 (executable)
@@ -354,7 +354,7 @@ else
        RC_BOOTLOG=
 fi
 
-if ! is_yes "$VSERVER"; then
+if ! is_yes "$VSERVER" && [[ "$container" != lxc* ]]; then
        # we need /proc mounted before everything
        is_fsmounted proc /proc || mount -n /proc || mount -n -o gid=17,hidepid=2 -t proc /proc /proc
 
@@ -428,7 +428,7 @@ else
        domainname ""
 fi
 
-if ! is_yes "$VSERVER"; then
+if ! is_yes "$VSERVER" && [[ "$container" != lxc* ]]; then
        # Set console loglevel
        if [ -n "$CONSOLE_LOGLEVEL" ]; then
                dmesg -n $CONSOLE_LOGLEVEL
@@ -502,7 +502,7 @@ if ! is_yes "$VSERVER"; then
                fi
        fi
 
-       if [ "$usb" = "1" -a -d /proc/bus/usb ] && ! is_fsmounted usbfs /proc/bus/usb ; then
+       if [ "$usb" = "1" -a -d /proc/bus/usb ] && ! is_fsmounted usbfs /proc/bus/usb; then
                run_cmd "Mounting USB filesystem" mount -n -t usbfs -o devgid=78,devmode=664 usbfs /proc/bus/usb
        fi
 
@@ -621,7 +621,7 @@ if [ -n "$IN_INITLOG" ]; then
        IN_INITLOG=""
 fi
 
-if ! is_yes "$VSERVER"; then
+if ! is_yes "$VSERVER" && [[ "$container" != lxc* ]]; then
        # Clear mtab
        > /etc/mtab
        [ -f /etc/cryptomtab ] && > /etc/cryptomtab
This page took 0.184217 seconds and 4 git commands to generate.