65a3b7 017-22.git20120302

Authored and Committed by Harald Hoyer 13 years ago
    017-22.git20120302
    
    nfs path fixes for live image over nfs
    root=live:nfs://10.10.10.10:/srv/all/install.img ip=dhcp rd.neednet
    
        
0019-Fix-correct-nfs-path.patch ADDED
@@ -0,0 +1,22 @@
1
+ From 778f767bccf14f49573d5fffca40841f42401e75 Mon Sep 17 00:00:00 2001
2
+ From: Jan Stodola <jstodola@redhat.com>
3
+ Date: Thu, 1 Mar 2012 20:22:57 +0100
4
+ Subject: [PATCH] Fix correct nfs path
5
+
6
+ ---
7
+ modules.d/45url-lib/url-lib.sh | 2 +-
8
+ 1 files changed, 1 insertions(+), 1 deletions(-)
9
+
10
+ diff --git a/modules.d/45url-lib/url-lib.sh b/modules.d/45url-lib/url-lib.sh
11
+ index 383e7ac..1fc80a1 100755
12
+ --- a/modules.d/45url-lib/url-lib.sh
13
+ +++ b/modules.d/45url-lib/url-lib.sh
14
+ @@ -99,7 +99,7 @@ nfs_fetch_url() {
15
+ mntdir=$(nfs_already_mounted $server $path)
16
+ if [ -z "$mntdir" ]; then
17
+ local mntdir="$(mkuniqdir /run nfs_mnt)"
18
+ - mount_nfs $nfs:$server:$path${options:+:$options} $mntdir
19
+ + mount_nfs $nfs:$server:$filepath${options:+:$options} $mntdir
20
+ # lazy unmount during pre-pivot hook
21
+ inst_hook --hook pre-pivot --name 99url-lib-umount-nfs umount -l $mntdir
22
+ fi
0020-move-emergency_shell-to-dracut-lib.sh.patch ADDED
@@ -0,0 +1,118 @@
1
+ From ffcc64bdea9080c2a1430ba59720f583bc0ac908 Mon Sep 17 00:00:00 2001
2
+ From: Will Woods <wwoods@redhat.com>
3
+ Date: Wed, 29 Feb 2012 13:09:58 -0500
4
+ Subject: [PATCH] move emergency_shell to dracut-lib.sh
5
+
6
+ This lets things running outside init call an emergency_shell.
7
+ (example: scripts called by initqueue)
8
+ ---
9
+ modules.d/99base/dracut-lib.sh | 38 ++++++++++++++++++++++++++++++++++++++
10
+ modules.d/99base/init.sh | 40 +---------------------------------------
11
+ 2 files changed, 39 insertions(+), 39 deletions(-)
12
+
13
+ diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
14
+ index afd366e..c31854e 100755
15
+ --- a/modules.d/99base/dracut-lib.sh
16
+ +++ b/modules.d/99base/dracut-lib.sh
17
+ @@ -753,3 +753,41 @@ killproc() {
18
+ need_shutdown() {
19
+ >/run/initramfs/.need_shutdown
20
+ }
21
+ +
22
+ +emergency_shell()
23
+ +{
24
+ + local _ctty
25
+ + set +e
26
+ + if [ "$1" = "-n" ]; then
27
+ + _rdshell_name=$2
28
+ + shift 2
29
+ + else
30
+ + _rdshell_name=dracut
31
+ + fi
32
+ + echo ; echo
33
+ + warn $@
34
+ + source_hook emergency
35
+ + echo
36
+ + wait_for_loginit
37
+ + [ -e /run/initramfs/.die ] && exit 1
38
+ + if getargbool 1 rd.shell -y rdshell || getarg rd.break rdbreak; then
39
+ + echo "Dropping to debug shell."
40
+ + echo
41
+ + export PS1="$_rdshell_name:\${PWD}# "
42
+ + [ -e /.profile ] || >/.profile
43
+ + _ctty=/dev/console
44
+ + if [ -n "$(command -v setsid)" ]; then
45
+ + _ctty="$(getarg rd.ctty=)" && _ctty="/dev/${_ctty##*/}"
46
+ + [ -c "$_ctty" ] || _ctty=/dev/tty1
47
+ + setsid sh -i -l 0<$_ctty 1>$_ctty 2>&1
48
+ + elif [ -n "$(command -v openvt)" ] && ! getarg "console=" >/dev/null 2>&1 && getargbool 1 "rd.openvt" ; then
49
+ + openvt -f -c 1 -w -s -l -- sh
50
+ + else
51
+ + sh -i -l 0<$_ctty 1>$_ctty 2>&1
52
+ + fi
53
+ + else
54
+ + warn "Boot has failed. To debug this issue add \"rdshell\" to the kernel command line."
55
+ + # cause a kernel panic
56
+ + exit 1
57
+ + fi
58
+ +}
59
+ diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
60
+ index 4d0a2a2..d197497 100755
61
+ --- a/modules.d/99base/init.sh
62
+ +++ b/modules.d/99base/init.sh
63
+ @@ -38,54 +38,16 @@ wait_for_loginit()
64
+ rm -f /run/initramfs/loginit.pipe /run/initramfs/loginit.pid
65
+ }
66
+
67
+ -emergency_shell()
68
+ -{
69
+ - local _ctty
70
+ - set +e
71
+ - if [ "$1" = "-n" ]; then
72
+ - _rdshell_name=$2
73
+ - shift 2
74
+ - else
75
+ - _rdshell_name=dracut
76
+ - fi
77
+ - echo ; echo
78
+ - warn $@
79
+ - source_hook emergency
80
+ - echo
81
+ - wait_for_loginit
82
+ - [ -e /run/initramfs/.die ] && exit 1
83
+ - if getargbool 1 rd.shell -y rdshell || getarg rd.break rdbreak; then
84
+ - echo "Dropping to debug shell."
85
+ - echo
86
+ - export PS1="$_rdshell_name:\${PWD}# "
87
+ - [ -e /.profile ] || >/.profile
88
+ - _ctty=/dev/console
89
+ - if [ -n "$(command -v setsid)" ]; then
90
+ - _ctty="$(getarg rd.ctty=)" && _ctty="/dev/${_ctty##*/}"
91
+ - [ -c "$_ctty" ] || _ctty=/dev/tty1
92
+ - setsid sh -i -l 0<$_ctty 1>$_ctty 2>&1
93
+ - elif [ -n "$(command -v openvt)" ] && ! getarg "console=" >/dev/null 2>&1 && getargbool 1 "rd.openvt" ; then
94
+ - openvt -f -c 1 -w -s -l -- sh
95
+ - else
96
+ - sh -i -l 0<$_ctty 1>$_ctty 2>&1
97
+ - fi
98
+ - else
99
+ - warn "Boot has failed. To debug this issue add \"rdshell\" to the kernel command line."
100
+ - # cause a kernel panic
101
+ - exit 1
102
+ - fi
103
+ -}
104
+ -
105
+ NEWROOT="/sysroot"
106
+ [ -d $NEWROOT ] || mkdir -p -m 0755 $NEWROOT
107
+
108
+ -trap "emergency_shell Signal caught!" 0
109
+ OLDPATH=$PATH
110
+ PATH=/usr/sbin:/usr/bin:/sbin:/bin
111
+ export PATH
112
+
113
+ RD_DEBUG=""
114
+ . /lib/dracut-lib.sh
115
+ +trap "emergency_shell Signal caught!" 0
116
+
117
+ [ -c /dev/null ] || mknod -m 0666 /dev/null c 1 3
118
+
0021-url-lib-make-nfs-support-optional.patch ADDED
@@ -0,0 +1,30 @@
1
+ From 8a0d2fc56feeb04d314a7fd6030bda5ce748b2f6 Mon Sep 17 00:00:00 2001
2
+ From: Will Woods <wwoods@redhat.com>
3
+ Date: Wed, 29 Feb 2012 13:09:57 -0500
4
+ Subject: [PATCH] url-lib: make nfs support optional
5
+
6
+ Only include /lib/nfs-lib.sh if it exists, and then only run
7
+ add_url_handler if nfs-lib was imported.
8
+ ---
9
+ modules.d/45url-lib/url-lib.sh | 4 ++--
10
+ 1 files changed, 2 insertions(+), 2 deletions(-)
11
+
12
+ diff --git a/modules.d/45url-lib/url-lib.sh b/modules.d/45url-lib/url-lib.sh
13
+ index 1fc80a1..043a700 100755
14
+ --- a/modules.d/45url-lib/url-lib.sh
15
+ +++ b/modules.d/45url-lib/url-lib.sh
16
+ @@ -74,7 +74,7 @@ set_http_header() {
17
+
18
+ ### NFS ##############################################################
19
+
20
+ -. /lib/nfs-lib.sh
21
+ +[ -e /lib/nfs-lib.sh ] && . /lib/nfs-lib.sh
22
+
23
+ nfs_already_mounted() {
24
+ local server="$1" path="$2" localdir="" s="" p=""
25
+ @@ -112,4 +112,4 @@ nfs_fetch_url() {
26
+ [ -f "$outloc" ] || return 253
27
+ echo "$outloc"
28
+ }
29
+ -add_url_handler nfs_fetch_url nfs nfs4
30
+ +command -v nfs_to_var >/dev/null && add_url_handler nfs_fetch_url nfs nfs4
file modified
+8 -1
dracut.spec CHANGED
@@ -10,7 +10,7 @@
10
10
11
11
Name: dracut
12
12
Version: 017
13
- Release: 19.git20120301%{?dist}
13
+ Release: 22.git20120302%{?dist}
14
14
15
15
Summary: Initramfs generator using udev
16
16
%if 0%{?fedora} || 0%{?rhel}
@@ -42,6 +42,9 @@ Patch15: 0015-98usrmount-mount-usr.sh-check-if-we-have-NEWROOT-etc.patch
42
42
Patch16: 0016-30convertfs-convertfs.sh-correct-check-for-usr-bin.patch
43
43
Patch17: 0017-90crypt-parse-crypt.sh-simplify-rd.luks.uuid-testing.patch
44
44
Patch18: 0018-dracut-functions.sh-install_kmod_with_fw-delay-.kern.patch
45
+ Patch19: 0019-Fix-correct-nfs-path.patch
46
+ Patch20: 0020-move-emergency_shell-to-dracut-lib.sh.patch
47
+ Patch21: 0021-url-lib-make-nfs-support-optional.patch
45
48
46
49
47
50
BuildArch: noarch
@@ -345,6 +348,10 @@ rm -rf $RPM_BUILD_ROOT
345
348
%dir /var/lib/dracut/overlay
346
349
347
350
%changelog
351
+ * Fri Mar 02 2012 Harald Hoyer <harald@redhat.com> 017-22.git20120302
352
+ - nfs path fixes for live image over nfs
353
+ root=live:nfs://10.10.10.10:/srv/all/install.img ip=dhcp rd.neednet
354
+
348
355
* Thu Mar 01 2012 Harald Hoyer <harald@redhat.com> 017-19.git20120301
349
356
- fixed include of some kernel modules
350
357