Browse Source

add source_conf for static configuration variables

source_conf sources all *.conf files of a directory

init will now source all /etc/conf.d/*.conf files
master
Harald Hoyer 16 years ago
parent
commit
0375106c78
  1. 5
      modules.d/95iscsi/iscsiroot
  2. 6
      modules.d/99base/dracut-lib.sh
  3. 2
      modules.d/99base/init

5
modules.d/95iscsi/iscsiroot

@ -30,10 +30,7 @@ fi @@ -30,10 +30,7 @@ fi
netif="$1"
root="$2"

# read static conf settings
for conf in conf/conf.d/*; do
[ -f ${conf} ] && . ${conf}
done
source_all /etc/conf.d

# If it's not iscsi we don't continue
[ "${root%%:*}" = "iscsi" ] || exit 1

6
modules.d/99base/dracut-lib.sh

@ -28,6 +28,12 @@ source_all() { @@ -28,6 +28,12 @@ source_all() {
for f in "/$1"/*.sh; do [ -f "$f" ] && . "$f"; done
}

source_conf() {
local f
[ "$1" ] && [ -d "/$1" ] || return
for f in "/$1"/*.conf; do [ -f "$f" ] && . "$f"; done
}

die() {
{
echo "<1>dracut: FATAL: $@";

2
modules.d/99base/init

@ -59,6 +59,8 @@ mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts >/dev/null 2>&1 @@ -59,6 +59,8 @@ mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts >/dev/null 2>&1

UDEVVERSION=$(udevadm --version)

source_conf /etc/conf.d

# run scriptlets to parse the command line
getarg 'rdbreak=cmdline' && emergency_shell "Break before cmdline"
source_all cmdline

Loading…
Cancel
Save