Browse Source

add /etc/dracut.conf.d

master
Harald Hoyer 15 years ago
parent
commit
2c2c45800c
  1. 1
      Makefile
  2. 14
      dracut
  3. 5
      dracut.8
  4. 1
      dracut.spec

1
Makefile

@ -37,6 +37,7 @@ ifeq (1,${WITH_SWITCH_ROOT}) @@ -37,6 +37,7 @@ ifeq (1,${WITH_SWITCH_ROOT})
install -m 0755 modules.d/99base/switch_root $(DESTDIR)$(sbindir)/switch_root
endif
install -m 0644 dracut.conf $(DESTDIR)$(sysconfdir)/dracut.conf
mkdir -p $(DESTDIR)$(sysconfdir)/dracut.conf.d
install -m 0755 dracut-functions $(DESTDIR)$(pkglibdir)/dracut-functions
cp -arx modules.d $(DESTDIR)$(pkglibdir)
install -m 0644 dracut.8 $(DESTDIR)$(mandir)/man8

14
dracut

@ -94,6 +94,7 @@ while (($# > 0)); do @@ -94,6 +94,7 @@ while (($# > 0)); do
--debug) debug="yes";;
-v|--verbose) beverbose="yes";;
-c|--conf) conffile="$2"; shift;;
--confdir) confdir="$2"; shift;;
-l|--local) allowlocal="yes" ;;
-H|--hostonly) hostonly_l="yes" ;;
-i|--include) include_src="$2"; include_target="$3"; shift 2;;
@ -122,6 +123,19 @@ if [[ ! -f $conffile ]]; then @@ -122,6 +123,19 @@ if [[ ! -f $conffile ]]; then
[[ $allowlocal ]] && conffile="$dracutbasedir/dracut.conf"
fi

if [[ ! -d $confdir ]]; then
[[ $allowlocal ]] || confdir="/etc/dracut.conf.d"
[[ $allowlocal ]] && confdir="$dracutbasedir/dracut.conf.d"
fi

# source our config dir
if [ "$confdir" ] && [ -d "$confdir" ]; then
local f
for f in "$confdir"/*.conf; do
[ -e "$f" ] && . "$f"
done
fi

# source our config file
[[ -f $conffile ]] && . "$conffile"


5
dracut.8

@ -75,6 +75,11 @@ specify configuration file to use. @@ -75,6 +75,11 @@ specify configuration file to use.
Default:
.IR /etc/dracut.conf
.TP
.BR \-\-confdir " \fIDIR\fR"
specify configuration directory to use.
Default:
.IR /etc/dracut.conf.d
.TP
.BR \-l ", " \-\-local
local mode. Use modules from the current working
directory instead of the system-wide installed in

1
dracut.spec

@ -180,6 +180,7 @@ rm -rf $RPM_BUILD_ROOT @@ -180,6 +180,7 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_datadir}/dracut
%{_datadir}/dracut/dracut-functions
%config(noreplace) /etc/dracut.conf
%dir /etc/dracut.conf.d
%{_mandir}/man8/dracut.8*
%{_mandir}/man5/dracut.conf.5*
%{_datadir}/dracut/modules.d/00dash

Loading…
Cancel
Save