SOURCES: rc-scripts-vserver-fixes.patch (NEW) - don't clear mtab i...
baggins
baggins at pld-linux.org
Tue Nov 22 19:43:22 CET 2005
Author: baggins Date: Tue Nov 22 18:43:22 2005 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- don't clear mtab in vserver (vserver scripts create it)
- properly detect non-legacy vserver
---- Files affected:
SOURCES:
rc-scripts-vserver-fixes.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/rc-scripts-vserver-fixes.patch
diff -u /dev/null SOURCES/rc-scripts-vserver-fixes.patch:1.1
--- /dev/null Tue Nov 22 19:43:22 2005
+++ SOURCES/rc-scripts-vserver-fixes.patch Tue Nov 22 19:43:17 2005
@@ -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
================================================================
More information about the pld-cvs-commit
mailing list