]> git.pld-linux.org Git - packages/util-vserver.git/commitdiff
outdated
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 7 Nov 2005 13:27:26 +0000 (13:27 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    util-vserver-mounted.patch -> 1.3

util-vserver-mounted.patch [deleted file]

diff --git a/util-vserver-mounted.patch b/util-vserver-mounted.patch
deleted file mode 100644 (file)
index 534a2a4..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-diff -ur util-vserver-0.30.208/scripts/vserver-build.functions /usr/lib/util-vserver/vserver-build.functions
---- util-vserver-0.30.208/scripts/vserver-build.functions      2005-10-12 15:34:51.640803600 +0200
-+++ /usr/lib/util-vserver/vserver-build.functions      2005-10-12 15:32:33.616786440 +0200
-@@ -102,14 +102,16 @@
- function _renameVserverCfg
- {
-     local suffix=.~$(date +'%s')~
--    local i
--    
--    for i in "$VDIR" "$SETUP_CONFDIR"; do
--      test ! -e "$i" || {
--          mv "$i" "$i$suffix"
--          say "Renamed '$i' to '$i$suffix'"
--      }
--    done
-+
-+    if [ -e "$VDIR" -a "$1" -ne 0 ]; then
-+      mv "$VDIR" "$VDIR$suffix"
-+      say "Renamed '$VDIR' to '$VDIR$suffix'"
-+    fi
-+
-+    if [ -e "$SETUP_CONFDIR" ]; then
-+      mv "$SETUP_CONFDIR" "$SETUP_CONFDIR$suffix"
-+      say "Renamed '$SETUP_CONFDIR' to '$SETUP_CONFDIR$suffix'"
-+    fi
- }
-@@ -157,11 +159,38 @@
- ## Usage: initFilesystem [force]
- function base.initFilesystem
- {
--    test -z "$1" || _renameVserverCfg
--    test ! -d "$VDIR" -a ! -d "$SETUP_CONFDIR" || {
-+    local list
-+    local vdirl
-+    local mounted
-+
-+    vdirl="$(readlink $ROOTDIR)/$VSERVERDIRNAME"
-+    mounted=0
-+    mount | grep -q "$vdirl" || mounted=$?
-+
-+    test -z "$1" || _renameVserverCfg $mounted
-+    test -d "$VDIR" && {
-+      if [ "$mounted" -eq 0 ]; then
-+          list=$(ls -1a "$vdirl" | awk '! /^(\.|\.\.|lost\+found)$/ { print $1; }')
-+          if [ -n "$list" ]; then
-+              echo \
-+"vserver-topdirectory '$vdirl' is a non-empty mounted filesystem;
-+please clean it manually"
-+>&2
-+              exit 1
-+          fi
-+      else
-+          echo \
-+"vserver-topdirectory '$VDIR' exist already;
-+please try to use '--force', or remove them manually"
-+>&2
-+          exit 1
-+      fi
-+    } >&2
-+
-+    test -d "$SETUP_CONFDIR" && {
-       echo \
--"vserver-topdirectory '$VDIR' and/or configuration at '$SETUP_CONFDIR'
--exist already; please try to use '--force', or remove them manually"
-+"configuration at '$SETUP_CONFDIR' exist already;
-+please try to use '--force', or remove them manually"
- >&2
-       exit 1
-     } >&2
This page took 0.059879 seconds and 4 git commands to generate.