Fix some bugs to make the static route work in the 2nd kernel.
Signed-off-by: Minfei Huang mhuang@redhat.com --- dracut-module-setup.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
It is boring that internal result is shown in the trminal. Redirect the result to /dev/null to make kdump result more clearly.
Signed-off-by: Minfei Huang mhuang@redhat.com --- dracut-module-setup.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index dcebc47..a06251e 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -212,8 +212,7 @@ get_routes() { local _route
_route=`/sbin/ip route get to $_target 2>&1` - if /sbin/ip route get to $_target | grep "via"; - then + if /sbin/ip route get to $_target | grep "via" > /dev/null; then # route going to a different subnet via a router echo $_route | awk '{printf("rd.route=%s:%s:%s\n", $1, $3, $5)}' \ >> ${initdir}/etc/cmdline.d/45route-static.conf
On 11/24/14 at 07:20pm, Minfei Huang wrote:
It is boring that internal result is shown in the trminal. Redirect the result to /dev/null to make kdump result more clearly.
Signed-off-by: Minfei Huang mhuang@redhat.com
dracut-module-setup.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index dcebc47..a06251e 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -212,8 +212,7 @@ get_routes() { local _route
_route=`/sbin/ip route get to $_target 2>&1`
- if /sbin/ip route get to $_target | grep "via";
- then
- if /sbin/ip route get to $_target | grep "via" > /dev/null; then
Looks good to me, Ack it.
Acked-by: Baoquan He bhe@redhat.com
# route going to a different subnet via a router echo $_route | awk '{printf("rd.route=%s:%s:%s\n", $1, $3, $5)}' \ >> ${initdir}/etc/cmdline.d/45route-static.conf
-- 1.8.3.1
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
On 11/24/14 at 07:20pm, Minfei Huang wrote:
It is boring that internal result is shown in the trminal. Redirect the result to /dev/null to make kdump result more clearly.
How about "grep -q"?
And please fix the typo in subject line and description: "Donot" -> "Do not" "trminal" -> "terminal"
Signed-off-by: Minfei Huang mhuang@redhat.com
dracut-module-setup.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index dcebc47..a06251e 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -212,8 +212,7 @@ get_routes() { local _route
_route=`/sbin/ip route get to $_target 2>&1`
- if /sbin/ip route get to $_target | grep "via";
- then
- if /sbin/ip route get to $_target | grep "via" > /dev/null; then # route going to a different subnet via a router echo $_route | awk '{printf("rd.route=%s:%s:%s\n", $1, $3, $5)}' \ >> ${initdir}/etc/cmdline.d/45route-static.conf
-- 1.8.3.1
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
On 12/01/14 at 03:03pm, WANG Chao wrote:
On 11/24/14 at 07:20pm, Minfei Huang wrote:
It is boring that internal result is shown in the trminal. Redirect the result to /dev/null to make kdump result more clearly.
How about "grep -q"?
You know what, I'm not strong with 'grep -q'. I think > /dev/null works for me.
And please fix the typo in subject line and description: "Donot" -> "Do not" "trminal" -> "terminal"
Signed-off-by: Minfei Huang mhuang@redhat.com
dracut-module-setup.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index dcebc47..a06251e 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -212,8 +212,7 @@ get_routes() { local _route
_route=`/sbin/ip route get to $_target 2>&1`
- if /sbin/ip route get to $_target | grep "via";
- then
- if /sbin/ip route get to $_target | grep "via" > /dev/null; then # route going to a different subnet via a router echo $_route | awk '{printf("rd.route=%s:%s:%s\n", $1, $3, $5)}' \ >> ${initdir}/etc/cmdline.d/45route-static.conf
-- 1.8.3.1
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
It fails to specify the static route in 2nd kernel, because of the wrong ethernet device name.
To make kdump work, we add a prefix "kdump-" before the ethernet device name (commit ba7660f37e792be082b7e0c9e73b76647db5e902).
Signed-off-by: Minfei Huang mhuang@redhat.com --- dracut-module-setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index a06251e..3209de5 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -214,11 +214,11 @@ get_routes() { _route=`/sbin/ip route get to $_target 2>&1` if /sbin/ip route get to $_target | grep "via" > /dev/null; then # route going to a different subnet via a router - echo $_route | awk '{printf("rd.route=%s:%s:%s\n", $1, $3, $5)}' \ + echo $_route | awk '{printf("rd.route=%s:%s:kdump-%s\n", $1, $3, $5)}' \ >> ${initdir}/etc/cmdline.d/45route-static.conf else # route going to a different subnet though directly connected - echo $_route | awk '{printf("rd.route=%s::%s\n", $1, $3)}' \ + echo $_route | awk '{printf("rd.route=%s::kdump-%s\n", $1, $3)}' \ >> ${initdir}/etc/cmdline.d/45route-static.conf fi
On 11/24/14 at 07:20pm, Minfei Huang wrote:
It fails to specify the static route in 2nd kernel, because of the wrong ethernet device name.
To make kdump work, we add a prefix "kdump-" before the ethernet device name (commit ba7660f37e792be082b7e0c9e73b76647db5e902).
Signed-off-by: Minfei Huang mhuang@redhat.com
dracut-module-setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index a06251e..3209de5 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -214,11 +214,11 @@ get_routes() { _route=`/sbin/ip route get to $_target 2>&1` if /sbin/ip route get to $_target | grep "via" > /dev/null; then # route going to a different subnet via a router
echo $_route | awk '{printf("rd.route=%s:%s:%s\n", $1, $3, $5)}' \
else # route going to a different subnet though directly connectedecho $_route | awk '{printf("rd.route=%s:%s:kdump-%s\n", $1, $3, $5)}' \ >> ${initdir}/etc/cmdline.d/45route-static.conf
echo $_route | awk '{printf("rd.route=%s::%s\n", $1, $3)}' \
echo $_route | awk '{printf("rd.route=%s::kdump-%s\n", $1, $3)}' \
Looks good to me, Ack.
Acked-by: Baoquan He bhe@redhat.com
>> ${initdir}/etc/cmdline.d/45route-static.conf fi
-- 1.8.3.1
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
On 11/26/14 at 03:33pm, Baoquan He wrote:
On 11/24/14 at 07:20pm, Minfei Huang wrote:
It fails to specify the static route in 2nd kernel, because of the wrong ethernet device name.
To make kdump work, we add a prefix "kdump-" before the ethernet device name (commit ba7660f37e792be082b7e0c9e73b76647db5e902).
Signed-off-by: Minfei Huang mhuang@redhat.com
dracut-module-setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index a06251e..3209de5 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -214,11 +214,11 @@ get_routes() { _route=`/sbin/ip route get to $_target 2>&1` if /sbin/ip route get to $_target | grep "via" > /dev/null; then # route going to a different subnet via a router
echo $_route | awk '{printf("rd.route=%s:%s:%s\n", $1, $3, $5)}' \
echo $_route | awk '{printf("rd.route=%s:%s:kdump-%s\n", $1, $3, $5)}' \
I only add "kdump-" prefix to device names like "ethX". If the device name is persistent naming like "em1" or "enp2s0", there won't be "kdump-" prefix added. You can look up kdump_setup_ifname().
So hard-coded kdump-%s here doesn't look good to me.
Thanks WANG Chao
>> ${initdir}/etc/cmdline.d/45route-static.conf else # route going to a different subnet though directly connected
echo $_route | awk '{printf("rd.route=%s::%s\n", $1, $3)}' \
echo $_route | awk '{printf("rd.route=%s::kdump-%s\n", $1, $3)}' \
Looks good to me, Ack.
Acked-by: Baoquan He bhe@redhat.com
>> ${initdir}/etc/cmdline.d/45route-static.conf fi
-- 1.8.3.1
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
Bao, can you review these two patches?
On 11/24/14 at 07:20pm, Minfei Huang wrote:
Fix some bugs to make the static route work in the 2nd kernel.
Signed-off-by: Minfei Huang mhuang@redhat.com
dracut-module-setup.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
-- 1.8.3.1
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec