Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
playground
>
dracut
> 0294-network-netroot-only-netroot-for-bootdev-if-present.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0294-network-netroot-only-netroot-for-bootdev-if-present.patch of Package dracut
From 8a3fe63a08ba0feefdb4ab489576f48bc9118204 Mon Sep 17 00:00:00 2001 From: Harald Hoyer <harald@redhat.com> Date: Fri, 12 Oct 2012 11:55:22 +0200 Subject: [PATCH] network/netroot: only netroot for bootdev, if present --- modules.d/40network/netroot | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules.d/40network/netroot b/modules.d/40network/netroot index 8f8c328..c2baaa9 100755 --- a/modules.d/40network/netroot +++ b/modules.d/40network/netroot @@ -25,7 +25,11 @@ done # Set or override primary interface netif=$1 -[ -e "/tmp/net.bootdev" ] && read netif < /tmp/net.bootdev +if [ -e "/tmp/net.bootdev" ]; then + read netif < /tmp/net.bootdev + # only boot from $netif + [ -n "$1" ] && [ -n "$netif"] && [ "$netif" != "$1" ] && exit 1 +fi # Figure out the handler for root=dhcp by recalling all netroot cmdline # handlers -- 1.8.3.1