Merge branch 'master' of github.com:haraldh/dracut

master
Harald Hoyer 2016-02-29 15:07:41 +01:00
commit cb6d49bc9d
5 changed files with 20 additions and 15 deletions

View File

@ -40,6 +40,8 @@ if [ -n "$NEEDBOOTDEV" ] && getargbool 1 rd.neednet; then
#[ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines"
echo "rd.neednet=1" > /etc/cmdline.d/dracut-neednet.conf
info "Multiple ip= arguments: assuming rd.neednet=1"
else
unset NEEDBOOTDEV
fi

# Check ip= lines
@ -48,17 +50,14 @@ for p in $(getargs ip=); do
ip_to_var $p

# make first device specified the BOOTDEV
if [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then
if [ -n "$NEEDBOOTDEV" ] && [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then
BOOTDEV="$dev"
[ -n "$NEEDBOOTDEV" ] && info "Setting bootdev to '$BOOTDEV'"
info "Setting bootdev to '$BOOTDEV'"
fi

# skip ibft since we did it above
[ "$autoconf" = "ibft" ] && continue

# We need to have an ip= line for the specified bootdev
[ -n "$NEEDBOOTDEV" ] && [ "$dev" = "$BOOTDEV" ] && BOOTDEVOK=1

# Empty autoconf defaults to 'dhcp'
if [ -z "$autoconf" ] ; then
warn "Empty autoconf values default to dhcp"

View File

@ -39,15 +39,17 @@ installkernel() {
ehci-hcd ehci-pci ehci-platform \
ohci-hcd ohci-pci \
uhci-hcd \
xhci-hcd xhci-pci xhci-plat-hcd

hostonly='' instmods \
xhci-hcd xhci-pci xhci-plat-hcd \
"=drivers/hid" \
"=drivers/input/serio" \
"=drivers/input/keyboard"
"=drivers/input/keyboard" \
"=drivers/usb/storage"

instmods yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \
atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus
instmods \
yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \
atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \
virtio virtio_blk virtio_ring virtio_pci virtio_scsi \
"=drivers/pcmcia" =ide

if [[ "$(uname -p)" == arm* ]]; then
# arm specific modules
@ -60,9 +62,6 @@ installkernel() {
${NULL}
fi

# install virtual machine support
instmods virtio virtio_blk virtio_ring virtio_pci virtio_scsi \
"=drivers/pcmcia" =ide "=drivers/usb/storage"

find_kernel_modules | block_module_filter | instmods


View File

@ -14,7 +14,8 @@ Before=dracut-cmdline.service
After=systemd-journald.socket
Wants=systemd-journald.socket
ConditionPathExists=/usr/lib/initrd-release
ConditionKernelCommandLine=rd.cmdline=ask
ConditionKernelCommandLine=|rd.cmdline=ask
ConditionPathExistsGlob=|/etc/cmdline.d/*.conf

[Service]
Environment=DRACUT_SYSTEMD=1

View File

@ -1,5 +1,9 @@
#!/bin/bash

type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh

getarg "rd.cmdline=ask" || exit 0

sleep 0.5
echo
sleep 0.5

View File

@ -120,7 +120,9 @@ if getarg "rd.cmdline=ask"; then
fi

if ! getargbool 1 'rd.hostonly'; then
[ -f /etc/cmdline.d/99-cmdline-ask.conf ] && mv /etc/cmdline.d/99-cmdline-ask.conf /tmp/99-cmdline-ask.conf
remove_hostonly_files
[ -f /tmp/99-cmdline-ask.conf ] && mv /tmp/99-cmdline-ask.conf /etc/cmdline.d/99-cmdline-ask.conf
fi

# run scriptlets to parse the command line