]> git.pld-linux.org Git - packages/rc-scripts.git/commitdiff
- don't clear mtab in vserver (vserver scripts create it) auto/ac/rc-scripts-0_4_0_21-3
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 22 Nov 2005 18:43:17 +0000 (18:43 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- properly detect non-legacy vserver

Changed files:
    rc-scripts-vserver-fixes.patch -> 1.1

rc-scripts-vserver-fixes.patch [new file with mode: 0644]

diff --git a/rc-scripts-vserver-fixes.patch b/rc-scripts-vserver-fixes.patch
new file mode 100644 (file)
index 0000000..2964fa1
--- /dev/null
@@ -0,0 +1,36 @@
+Index: rc.d/rc.sysinit
+===================================================================
+--- rc.d/rc.sysinit    (revision 6539)
++++ rc.d/rc.sysinit    (working copy)
+@@ -377,14 +377,14 @@
+       done
+ fi
+-# Clear mtab
+-:>/etc/mtab
+-[ -f /etc/cryptomtab ] && :>/etc/cryptomtab
+-
+ # Remove stale backups
+ rm -f /etc/mtab~ /etc/mtab~~ /etc/cryptomtab~ /etc/cryptomtab~~
+ if ! is_yes "$VSERVER"; then
++      # Clear mtab
++      :>/etc/mtab
++      [ -f /etc/cryptomtab ] && :>/etc/cryptomtab
++
+       # Enter root, /proc, /sys, devfs and other into mtab.
+       mount -f /
+       mount -f /proc
+Index: rc.d/init.d/functions
+===================================================================
+--- rc.d/init.d/functions      (revision 6539)
++++ rc.d/init.d/functions      (working copy)
+@@ -52,7 +52,7 @@
+ [ -z "$COLUMNS" ] && COLUMNS=80
+ if [ -z "$VSERVER" -o "$VSERVER" = "detect" ]; then
+-      _ctx="$(awk '/s_context:.*/ { print $2 }' /proc/self/status 2>/dev/null)"
++      _ctx="$(awk '/(s_context|VxID):.*/ { print $2 }' /proc/self/status 2>/dev/null)"
+       if [ -z "$_ctx" -o "$_ctx" = "0" ]; then
+               VSERVER=no
+       else
This page took 0.048406 seconds and 4 git commands to generate.