check for getarg() function before sourcing dracut-lib.sh

make use of "type getarg" to check, if we really need to source
dracut-lib.sh
master
Harald Hoyer 2011-03-25 13:07:39 +01:00
parent c97e1a76f3
commit c9f1e3d1f4
22 changed files with 23 additions and 23 deletions

View File

@ -48,7 +48,7 @@ PATH=$PATH:/sbin:/usr/sbin

export PS4="dhclient.$interface.$$ + "
exec >>/run/initramfs/initlog.pipe 2>>/run/initramfs/initlog.pipe
. /lib/dracut-lib.sh
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh

# We already need a set netif here
netif=$interface

View File

@ -7,7 +7,7 @@
#
PATH=$PATH:/sbin:/usr/sbin

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

# Run dhclient
do_dhcp() {
@ -84,7 +84,7 @@ PATH=$PATH:/sbin:/usr/sbin

export PS4="ifup.$1.$$ + "
exec >>/run/initramfs/initlog.pipe 2>>/run/initramfs/initlog.pipe
. /lib/dracut-lib.sh
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh

# Huh? No $1?
[ -z "$1" ] && exit 1

View File

@ -4,7 +4,7 @@

PATH=$PATH:/sbin:/usr/sbin

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

# Huh? Empty $1?
[ -z "$1" ] && exit 1

View File

@ -14,7 +14,7 @@
# routing,dns,dhcp-options,etc.
#

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

# Check if ip= lines should be used
if getarg ip= >/dev/null ; then

View File

@ -2,7 +2,7 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

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

# Try to mount specified device (by path, by UUID or by label) and check
# the path with 'test'.

View File

@ -2,7 +2,7 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

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

DM_RAIDS=$(getargs rd.dm.uuid rd_DM_UUID=)


View File

@ -2,7 +2,7 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

. /lib/dracut-lib.sh
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
[ -f /tmp/root.info ] && . /tmp/root.info

PATH=$PATH:/sbin:/usr/sbin

View File

@ -4,7 +4,7 @@

# run lvm scan if udev has settled

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

VGS=$(getargs rd.lvm.vg rd_LVM_VG=)
LVS=$(getargs rd.lvm.lv rd_LVM_LV=)

View File

@ -1,7 +1,7 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
. /lib/dracut-lib.sh
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh

info "Autoassembling MD Raid"
/sbin/mdadm -As --auto=yes --run 2>&1 | vinfo

View File

@ -1,7 +1,7 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
. /lib/dracut-lib.sh
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh

md=$1
udevadm control --stop-exec-queue

View File

@ -2,7 +2,7 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

. /lib/dracut-lib.sh
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
# run mdadm if udev has settled
info "Assembling MD RAID arrays"
udevadm control --stop-exec-queue

View File

@ -15,7 +15,7 @@ PATH=$PATH:/sbin:/usr/sbin

export PS4="fcoe-up.$1.$$ + "
exec >>/run/initramfs/initlog.pipe 2>>/run/initramfs/initlog.pipe
. /lib/dracut-lib.sh
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh

netif=$1
dcb=$2

View File

@ -8,7 +8,7 @@
# iscsistart needs this.
#

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

PATH=$PATH:/sbin:/usr/sbin


View File

@ -2,7 +2,7 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

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

PATH=$PATH:/sbin:/usr/sbin


View File

@ -2,7 +2,7 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

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

PATH=$PATH:/sbin:/usr/sbin


View File

@ -25,7 +25,7 @@
# NFSv3 is used.
#

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

#Don't continue if root is ok
[ -n "$rootok" ] && return

View File

@ -2,7 +2,7 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

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

filter_rootopts() {
rootopts=$1

View File

@ -9,7 +9,7 @@
#sysloglevel=level What level has to be logged
#syslogtype=rsyslog|syslog|syslogng
# Don't auto detect syslog but set it
. /lib/dracut-lib.sh
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh

syslogserver=$(getarg syslog.server syslog)
syslogfilters=$(getargs syslog.filter filter)

View File

@ -4,7 +4,7 @@

# Triggered by udev and starts rsyslogd with bootparameters

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

rsyslog_config() {
local server=$1

View File

@ -4,7 +4,7 @@

# Just cleans up a previously started syslogd

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

if [ -f /tmp/syslog.server ]; then
read syslogtype < /tmp/syslog.type

View File

@ -3,7 +3,7 @@
# ex: ts=8 sw=4 sts=4 et filetype=sh

# Creates the syslog udev rules to be triggered when interface becomes online.
. /lib/dracut-lib.sh
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh

detect_syslog() {
syslogtype=""

View File

@ -7,7 +7,7 @@
# Copyright 2008-2010, Red Hat, Inc.
# Harald Hoyer <harald@redhat.com>

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

while [ $# -gt 0 ]; do
case "$1" in