@@ -1,22 +1,54 @@
|
|
1
|
-
From
|
1
|
+
From 95268ffed378ac2bb3b5959cdbbf2e8b7e10534e Mon Sep 17 00:00:00 2001
|
2
2
|
From: Harald Hoyer <harald@redhat.com>
|
3
3
|
Date: Wed, 29 Feb 2012 13:21:51 +0100
|
4
4
|
Subject: [PATCH] 30convertfs/convertfs.sh: correct check for /usr/bin
|
5
5
|
|
6
6
|
---
|
7
|
-
modules.d/30convertfs/convertfs.sh |
|
8
|
-
1 files changed,
|
7
|
+
modules.d/30convertfs/convertfs.sh | 17 ++++++++++-------
|
8
|
+
1 files changed, 10 insertions(+), 7 deletions(-)
|
9
9
|
|
10
10
|
diff --git a/modules.d/30convertfs/convertfs.sh b/modules.d/30convertfs/convertfs.sh
|
11
|
-
index 036ec51..
|
11
|
+
index 036ec51..d1d25aa 100755
|
12
12
|
--- a/modules.d/30convertfs/convertfs.sh
|
13
13
|
+++ b/modules.d/30convertfs/convertfs.sh
|
14
|
-
@@ -
|
15
|
-
|
14
|
+
@@ -21,13 +21,13 @@ while [[ "$ROOT" != "${ROOT%/}" ]]; do
|
15
|
+
ROOT=${ROOT%/}
|
16
|
+
done
|
17
|
+
|
18
|
+
-if [ ! -L $ROOT/var/run ]; then
|
19
|
+
+if [ ! -L $ROOT/var/run -a -e $ROOT/var/run ]; then
|
20
|
+
echo "Converting /var/run to symlink"
|
21
|
+
mv -f $ROOT/var/run $ROOT/var/run.runmove~
|
22
|
+
ln -sfn ../run $ROOT/var/run
|
16
23
|
fi
|
17
24
|
|
18
|
-
-if [ -
|
25
|
+
-if [ ! -L $ROOT/var/lock ]; then
|
26
|
+
+if [ ! -L $ROOT/var/lock -a -e $ROOT/var/lock ]; then
|
27
|
+
echo "Converting /var/lock to symlink"
|
28
|
+
mv -f $ROOT/var/lock $ROOT/var/lock.lockmove~
|
29
|
+
ln -sfn ../run/lock $ROOT/var/lock
|
30
|
+
@@ -42,16 +42,19 @@ needconvert() {
|
31
|
+
return 1
|
32
|
+
}
|
33
|
+
|
19
34
|
+if ! [ -e "$ROOT/usr/bin" ]; then
|
20
|
-
|
21
|
-
|
35
|
+
+ echo "$ROOT/usr/bin does not exist!"
|
36
|
+
+ echo "Make sure, the kernel command line has enough information"
|
37
|
+
+ echo "to mount /usr (man dracut.cmdline)"
|
38
|
+
+ exit 1
|
39
|
+
+fi
|
40
|
+
+
|
41
|
+
+
|
42
|
+
if ! needconvert; then
|
43
|
+
echo "Your system is already converted."
|
44
|
+
exit 0
|
22
45
|
fi
|
46
|
+
|
47
|
+
-if [ -e "$ROOT/usr/bin" ]; then
|
48
|
+
- echo "$ROOT/usr/bin does not exist"
|
49
|
+
- exit 1
|
50
|
+
-fi
|
51
|
+
-
|
52
|
+
testfile="$ROOT/.usrmovecheck$$"
|
53
|
+
rm -f "$testfile"
|
54
|
+
> "$testfile"
|