[dracut/f17] fixed convertfs

Harald Hoyer harald at fedoraproject.org
Wed Feb 29 12:32:04 UTC 2012


commit a925575626da1dc674d5e480afa6f9efcfec3000
Author: Harald Hoyer <harald at redhat.com>
Date:   Wed Feb 29 13:31:37 2012 +0100

    fixed convertfs

 ...fs-convertfs.sh-correct-check-for-usr-bin.patch |   50 ++++++++++++++++----
 1 files changed, 41 insertions(+), 9 deletions(-)
---
diff --git a/0016-30convertfs-convertfs.sh-correct-check-for-usr-bin.patch b/0016-30convertfs-convertfs.sh-correct-check-for-usr-bin.patch
index 1bb61e8..fdea29e 100644
--- a/0016-30convertfs-convertfs.sh-correct-check-for-usr-bin.patch
+++ b/0016-30convertfs-convertfs.sh-correct-check-for-usr-bin.patch
@@ -1,22 +1,54 @@
-From 97ce24ad8c97ca061675cf341301153a5314f851 Mon Sep 17 00:00:00 2001
+From 95268ffed378ac2bb3b5959cdbbf2e8b7e10534e Mon Sep 17 00:00:00 2001
 From: Harald Hoyer <harald at redhat.com>
 Date: Wed, 29 Feb 2012 13:21:51 +0100
 Subject: [PATCH] 30convertfs/convertfs.sh: correct check for /usr/bin
 
 ---
- modules.d/30convertfs/convertfs.sh |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+ modules.d/30convertfs/convertfs.sh |   17 ++++++++++-------
+ 1 files changed, 10 insertions(+), 7 deletions(-)
 
 diff --git a/modules.d/30convertfs/convertfs.sh b/modules.d/30convertfs/convertfs.sh
-index 036ec51..83cb68a 100755
+index 036ec51..d1d25aa 100755
 --- a/modules.d/30convertfs/convertfs.sh
 +++ b/modules.d/30convertfs/convertfs.sh
-@@ -47,7 +47,7 @@ if ! needconvert; then
-     exit 0
+@@ -21,13 +21,13 @@ while [[ "$ROOT" != "${ROOT%/}" ]]; do
+     ROOT=${ROOT%/}
+ done
+ 
+-if [ ! -L $ROOT/var/run ]; then
++if [ ! -L $ROOT/var/run -a -e $ROOT/var/run ]; then
+     echo "Converting /var/run to symlink"
+     mv -f $ROOT/var/run $ROOT/var/run.runmove~
+     ln -sfn ../run $ROOT/var/run
  fi
  
--if [ -e "$ROOT/usr/bin" ]; then
+-if [ ! -L $ROOT/var/lock ]; then
++if [ ! -L $ROOT/var/lock -a -e $ROOT/var/lock ]; then
+     echo "Converting /var/lock to symlink"
+     mv -f $ROOT/var/lock $ROOT/var/lock.lockmove~
+     ln -sfn ../run/lock $ROOT/var/lock
+@@ -42,16 +42,19 @@ needconvert() {
+     return 1
+ }
+ 
 +if ! [ -e "$ROOT/usr/bin" ]; then
-     echo "$ROOT/usr/bin does not exist"
-     exit 1
++    echo "$ROOT/usr/bin does not exist!"
++    echo "Make sure, the kernel command line has enough information"
++    echo "to mount /usr (man dracut.cmdline)"
++    exit 1
++fi
++
++
+ if ! needconvert; then
+     echo "Your system is already converted."
+     exit 0
  fi
+ 
+-if [ -e "$ROOT/usr/bin" ]; then
+-    echo "$ROOT/usr/bin does not exist"
+-    exit 1
+-fi
+-
+ testfile="$ROOT/.usrmovecheck$$"
+ rm -f "$testfile"
+ > "$testfile"


More information about the scm-commits mailing list