Magellan Linux

Annotation of /trunk/dracut/patches/dracut-017-correct-check-for-usr-bin.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1693 - (hide annotations) (download)
Sat Mar 10 21:07:54 2012 UTC (12 years, 2 months ago) by niro
File size: 1591 byte(s)


1 niro 1693 From 95268ffed378ac2bb3b5959cdbbf2e8b7e10534e Mon Sep 17 00:00:00 2001
2     From: Harald Hoyer <harald@redhat.com>
3     Date: Wed, 29 Feb 2012 13:21:51 +0100
4     Subject: [PATCH] 30convertfs/convertfs.sh: correct check for /usr/bin
5    
6     ---
7     modules.d/30convertfs/convertfs.sh | 17 ++++++++++-------
8     1 files changed, 10 insertions(+), 7 deletions(-)
9    
10     diff --git a/modules.d/30convertfs/convertfs.sh b/modules.d/30convertfs/convertfs.sh
11     index 036ec51..d1d25aa 100755
12     --- a/modules.d/30convertfs/convertfs.sh
13     +++ b/modules.d/30convertfs/convertfs.sh
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
23     fi
24    
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    
34     +if ! [ -e "$ROOT/usr/bin" ]; then
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
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"
55     --
56     1.7.6.5
57