diff -Naur dracut-024/dracut.conf.d/magellan.conf.example dracut-024-magellan/dracut.conf.d/magellan.conf.example --- dracut-024/dracut.conf.d/magellan.conf.example 1970-01-01 00:00:00.000000000 +0000 +++ dracut-024-magellan/dracut.conf.d/magellan.conf.example 2012-10-28 20:30:59.611513461 +0000 @@ -0,0 +1,17 @@ +# Dracut config file customized for Magellan-Linux. + +# i18n +i18n_vars="/etc/conf.d/keymap:KEYMAP /etc/conf.d/consolefont:CONSOLEFONT" +omit_drivers+=" .*/fs/ocfs/.* " +stdloglvl=3 +install_items+=" nano /etc/nanorc lsmod ps grep cat rm " +prefix="/" +systemdutildir=/usr/lib/systemd +systemdsystemunitdir=/usr/lib/systemd/system +udevdir=/usr/lib/udev +omit_dracutmodules+=" dash " +add_dracutmodules+=" systemd " +realinitpath="/usr/lib/systemd/systemd" +# Uncomment this to enable autoassembly of special devices like cryptoLUKS, +# dmraid, mdraid or lvm. Default is off as of dracut version >= 024. +#kernelcmdline+=" rd.auto=1 " diff -Naur dracut-024/Makefile dracut-024-magellan/Makefile --- dracut-024/Makefile 2012-10-16 14:31:06.000000000 +0000 +++ dracut-024-magellan/Makefile 2012-10-28 20:26:49.476412946 +0000 @@ -91,6 +91,9 @@ install -m 0755 lsinitrd.sh $(DESTDIR)$(bindir)/lsinitrd install -m 0644 dracut.conf $(DESTDIR)$(sysconfdir)/dracut.conf mkdir -p $(DESTDIR)$(sysconfdir)/dracut.conf.d + install -m 0644 dracut.conf.d/magellan.conf.example $(DESTDIR)$(sysconfdir)/dracut.conf.d/01-magellan.conf + mkdir -p $(DESTDIR)$(sysconfdir)/logrotate.d + install -m 0644 dracut.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/dracut install -m 0755 dracut-functions.sh $(DESTDIR)$(pkglibdir)/dracut-functions.sh install -m 0755 dracut-version.sh $(DESTDIR)$(pkglibdir)/dracut-version.sh ln -fs dracut-functions.sh $(DESTDIR)$(pkglibdir)/dracut-functions diff -Naur dracut-024/Makefile.orig dracut-024-magellan/Makefile.orig --- dracut-024/Makefile.orig 1970-01-01 00:00:00.000000000 +0000 +++ dracut-024-magellan/Makefile.orig 2012-10-16 14:31:06.000000000 +0000 @@ -0,0 +1,192 @@ +VERSION=024 +GITVERSION=$(shell [ -d .git ] && git rev-list --abbrev-commit -n 1 HEAD |cut -b 1-8) + +-include Makefile.inc + +prefix ?= /usr +libdir ?= ${prefix}/lib +datadir ?= ${prefix}/share +pkglibdir ?= ${libdir}/dracut +sysconfdir ?= ${prefix}/etc +bindir ?= ${prefix}/bin +mandir ?= ${prefix}/share/man +CFLAGS ?= -O2 -g -Wall +CFLAGS += -std=gnu99 + +man1pages = lsinitrd.1 + +man5pages = dracut.conf.5 + +man7pages = dracut.cmdline.7 + +man8pages = dracut.8 \ + dracut-catimages.8 \ + mkinitrd.8 \ + modules.d/98systemd/dracut-cmdline.service.8 \ + modules.d/98systemd/dracut-initqueue.service.8 \ + modules.d/98systemd/dracut-pre-pivot.service.8 \ + modules.d/98systemd/dracut-pre-trigger.service.8 \ + modules.d/98systemd/dracut-pre-udev.service.8 \ + modules.d/98systemd/initrd-switch-root.service.8 \ + modules.d/98systemd/udevadm-cleanup-db.service.8 + +manpages = $(man1pages) $(man5pages) $(man7pages) $(man8pages) + + +.PHONY: install clean archive rpm testimage test all check AUTHORS doc + +all: syncheck dracut-version.sh dracut-install + +DRACUT_INSTALL_OBJECTS = \ + install/dracut-install.o \ + install/hashmap.o\ + install/log.o \ + install/util.o + +# deps generated with gcc -MM +install/dracut-install.o: install/dracut-install.c install/log.h install/macro.h \ + install/hashmap.h install/util.h +install/hashmap.o: install/hashmap.c install/util.h install/macro.h install/log.h \ + install/hashmap.h +install/log.o: install/log.c install/log.h install/macro.h install/util.h +install/util.o: install/util.c install/util.h install/macro.h install/log.h + +install/dracut-install: $(DRACUT_INSTALL_OBJECTS) + +dracut-install: install/dracut-install + ln -fs $< $@ + +indent: + indent -i8 -nut -br -linux -l120 install/dracut-install.c + +doc: $(manpages) dracut.html + +ifneq ($(enable_documentation),no) +all: doc +endif + +%: %.xml + xsltproc -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< + +%.xml: %.asc + asciidoc -d manpage -b docbook -o $@ $< + +dracut.html: dracut.asc $(manpages) + asciidoc -a numbered -d book -b docbook -o dracut.xml dracut.asc + xsltproc -o dracut.html --xinclude -nonet \ + --stringparam html.stylesheet \ + http://docs.fedoraproject.org/en-US/Common_Content/css/default.css \ + http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl dracut.xml + rm dracut.xml + +install: dracut-version.sh + mkdir -p $(DESTDIR)$(pkglibdir) + mkdir -p $(DESTDIR)$(bindir) + mkdir -p $(DESTDIR)$(sysconfdir) + mkdir -p $(DESTDIR)$(pkglibdir)/modules.d + mkdir -p $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man7 $(DESTDIR)$(mandir)/man8 + install -m 0755 dracut.sh $(DESTDIR)$(bindir)/dracut + install -m 0755 dracut-catimages.sh $(DESTDIR)$(bindir)/dracut-catimages + install -m 0755 mkinitrd-dracut.sh $(DESTDIR)$(bindir)/mkinitrd + install -m 0755 lsinitrd.sh $(DESTDIR)$(bindir)/lsinitrd + install -m 0644 dracut.conf $(DESTDIR)$(sysconfdir)/dracut.conf + mkdir -p $(DESTDIR)$(sysconfdir)/dracut.conf.d + install -m 0755 dracut-functions.sh $(DESTDIR)$(pkglibdir)/dracut-functions.sh + install -m 0755 dracut-version.sh $(DESTDIR)$(pkglibdir)/dracut-version.sh + ln -fs dracut-functions.sh $(DESTDIR)$(pkglibdir)/dracut-functions + install -m 0755 dracut-logger.sh $(DESTDIR)$(pkglibdir)/dracut-logger.sh + install -m 0755 dracut-initramfs-restore.sh $(DESTDIR)$(pkglibdir)/dracut-initramfs-restore + cp -arx modules.d $(DESTDIR)$(pkglibdir) +ifneq ($(enable_documentation),no) + for i in $(man1pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man1/$${i##*/}; done + for i in $(man5pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man5/$${i##*/}; done + for i in $(man7pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man7/$${i##*/}; done + for i in $(man8pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man8/$${i##*/}; done + ln -fs dracut.cmdline.7 $(DESTDIR)$(mandir)/man7/dracut.kernel.7 +endif + if [ -n "$(systemdsystemunitdir)" ]; then \ + mkdir -p $(DESTDIR)$(systemdsystemunitdir); \ + install -m 0644 dracut-shutdown.service $(DESTDIR)$(systemdsystemunitdir); \ + mkdir -p $(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants; \ + ln -s ../dracut-shutdown.service \ + $(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants/dracut-shutdown.service; \ + fi + if [ -f install/dracut-install ]; then \ + install -m 0755 install/dracut-install $(DESTDIR)$(pkglibdir)/dracut-install; \ + fi + +dracut-version.sh: + @echo "DRACUT_VERSION=$(VERSION)-$(GITVERSION)" > dracut-version.sh + +clean: + $(RM) *~ + $(RM) */*~ + $(RM) */*/*~ + $(RM) $(manpages:%=%.xml) dracut.xml + $(RM) test-*.img + $(RM) dracut-*.rpm dracut-*.tar.bz2 + $(RM) dracut-install install/dracut-install $(DRACUT_INSTALL_OBJECTS) + $(RM) $(manpages) dracut.html + $(MAKE) -C test clean + +archive: dracut-$(VERSION)-$(GITVERSION).tar.bz2 + +dist: dracut-$(VERSION).tar.bz2 + +dracut-$(VERSION).tar.bz2: doc + git archive --format=tar $(VERSION) --prefix=dracut-$(VERSION)/ > dracut-$(VERSION).tar + mkdir -p dracut-$(VERSION) + cp $(manpages) dracut.html dracut-$(VERSION) + tar -rf dracut-$(VERSION).tar dracut-$(VERSION)/*.[0-9] dracut-$(VERSION)/dracut.html + rm -fr dracut-$(VERSION).tar.bz2 dracut-$(VERSION) + bzip2 -9 dracut-$(VERSION).tar + rm -f dracut-$(VERSION).tar + +rpm: dracut-$(VERSION).tar.bz2 + rpmbuild=$$(mktemp -d -t rpmbuild-dracut.XXXXXX); src=$$(pwd); \ + cp dracut-$(VERSION).tar.bz2 "$$rpmbuild"; \ + LC_MESSAGES=C $$src/git2spec.pl $(VERSION) "$$rpmbuild" < dracut.spec > $$rpmbuild/dracut.spec; \ + (cd "$$rpmbuild"; rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \ + --define "_specdir $$PWD" --define "_srcrpmdir $$PWD" \ + --define "_rpmdir $$PWD" -ba dracut.spec; ) && \ + ( mv "$$rpmbuild"/$$(arch)/*.rpm .; mv "$$rpmbuild"/*.src.rpm .;rm -fr "$$rpmbuild"; ls *.rpm ) + +syncheck: + @ret=0;for i in dracut-initramfs-restore.sh dracut-logger.sh \ + modules.d/99base/init.sh modules.d/*/*.sh; do \ + [ "$${i##*/}" = "module-setup.sh" ] && continue; \ + read line < "$$i"; [ "$${line#*bash*}" != "$$line" ] && continue; \ + dash -n "$$i" ; ret=$$(($$ret+$$?)); \ + done;exit $$ret + @ret=0;for i in *.sh mkinitrd-dracut.sh modules.d/*/*.sh \ + modules.d/*/module-setup.sh; do \ + bash -n "$$i" ; ret=$$(($$ret+$$?)); \ + done;exit $$ret + +check: all syncheck + @[ "$$EUID" == "0" ] || { echo "'check' must be run as root! Please use 'sudo'."; exit 1; } + @$(MAKE) -C test check + +testimage: all + ./dracut.sh -l -a debug -f test-$(shell uname -r).img $(shell uname -r) + @echo wrote test-$(shell uname -r).img + +testimages: all + ./dracut.sh -l -a debug --kernel-only -f test-kernel-$(shell uname -r).img $(shell uname -r) + @echo wrote test-$(shell uname -r).img + ./dracut.sh -l -a debug --no-kernel -f test-dracut.img $(shell uname -r) + @echo wrote test-dracut.img + +hostimage: all + ./dracut.sh -H -l -a debug -f test-$(shell uname -r).img $(shell uname -r) + @echo wrote test-$(shell uname -r).img + +AUTHORS: + git shortlog --numbered --summary -e |while read a rest; do echo $$rest;done > AUTHORS + +dracut.html.sign: dracut-$(VERSION).tar.bz2 + gpg-sign-all dracut-$(VERSION).tar.bz2 dracut.html + +upload: dracut.html.sign + kup put dracut-$(VERSION).tar.bz2 dracut-$(VERSION).tar.sign /pub/linux/utils/boot/dracut/ + kup put dracut.html dracut.html.sign /pub/linux/utils/boot/dracut/ diff -Naur dracut-024/modules.d/10i18n/console_init.sh dracut-024-magellan/modules.d/10i18n/console_init.sh --- dracut-024/modules.d/10i18n/console_init.sh 2012-10-16 14:31:06.000000000 +0000 +++ dracut-024-magellan/modules.d/10i18n/console_init.sh 2012-10-28 20:26:49.477412947 +0000 @@ -11,7 +11,7 @@ [ -e /etc/vconsole.conf ] && . /etc/vconsole.conf DEFAULT_FONT=LatArCyrHeb-16 -DEFAULT_KEYMAP=/etc/sysconfig/console/default.kmap +DEFAULT_KEYMAP=/etc/conf.d/console/default.kmap set_keyboard() { local param diff -Naur dracut-024/modules.d/40network/module-setup.sh dracut-024-magellan/modules.d/40network/module-setup.sh --- dracut-024/modules.d/40network/module-setup.sh 2012-10-16 14:31:06.000000000 +0000 +++ dracut-024-magellan/modules.d/40network/module-setup.sh 2012-10-28 20:26:49.477412947 +0000 @@ -16,7 +16,7 @@ } depends() { - [ -d /etc/sysconfig/network-scripts/ ] && echo ifcfg + [ -d /etc/conf.d/network-scripts/ ] && echo ifcfg return 0 } diff -Naur dracut-024/modules.d/45ifcfg/write-ifcfg.sh dracut-024-magellan/modules.d/45ifcfg/write-ifcfg.sh --- dracut-024/modules.d/45ifcfg/write-ifcfg.sh 2012-10-16 14:31:06.000000000 +0000 +++ dracut-024-magellan/modules.d/45ifcfg/write-ifcfg.sh 2012-10-28 20:26:49.477412947 +0000 @@ -230,13 +230,13 @@ done # Pass network opts -mkdir -m 0755 -p /run/initramfs/state/etc/sysconfig/network-scripts +mkdir -m 0755 -p /run/initramfs/state/etc/conf.d/network-scripts mkdir -m 0755 -p /run/initramfs/state/var/lib/dhclient -echo "files /etc/sysconfig/network-scripts" >> /run/initramfs/rwtab +echo "files /etc/conf.d/network-scripts" >> /run/initramfs/rwtab echo "files /var/lib/dhclient" >> /run/initramfs/rwtab { cp /tmp/net.* /run/initramfs/ cp /tmp/net.$netif.resolv.conf /run/initramfs/state/etc/resolv.conf - copytree /tmp/ifcfg /run/initramfs/state/etc/sysconfig/network-scripts + copytree /tmp/ifcfg /run/initramfs/state/etc/conf.d/network-scripts cp /tmp/ifcfg-leases/* /run/initramfs/state/var/lib/dhclient } > /dev/null 2>&1 diff -Naur dracut-024/modules.d/45ifcfg/write-ifcfg.sh.orig dracut-024-magellan/modules.d/45ifcfg/write-ifcfg.sh.orig --- dracut-024/modules.d/45ifcfg/write-ifcfg.sh.orig 1970-01-01 00:00:00.000000000 +0000 +++ dracut-024-magellan/modules.d/45ifcfg/write-ifcfg.sh.orig 2012-10-16 14:31:06.000000000 +0000 @@ -0,0 +1,242 @@ +#!/bin/sh +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +# NFS root might have reached here before /tmp/net.ifaces was written +udevadm settle --timeout=30 +# Don't write anything if we don't know our bootdev +[ -f /tmp/net.ifaces ] || return 1 + +read IFACES < /tmp/net.ifaces + +if [ -e /tmp/bond.info ]; then + . /tmp/bond.info +fi + +if [ -e /tmp/bridge.info ]; then + . /tmp/bridge.info +fi + +mkdir -m 0755 -p /tmp/ifcfg/ +mkdir -m 0755 -p /tmp/ifcfg-leases/ + +get_config_line_by_subchannel() +{ + local CHANNEL + local line + + CHANNELS="$1" + while read line; do + if strstr "$line" "$CHANNELS"; then + echo $line + return 0 + fi + done < /etc/ccw.conf + return 1 +} + +print_s390() { + local _netif + local SUBCHANNELS + local OPTIONS + local NETTYPE + local CONFIG_LINE + local i + local channel + local OLD_IFS + + _netif="$1" + # if we find ccw channel, then use those, instead of + # of the MAC + SUBCHANNELS=$({ + for i in /sys/class/net/$_netif/device/cdev[0-9]*; do + [ -e $i ] || continue + channel=$(readlink -f $i) + echo -n "${channel##*/}," + done + }) + [ -n "$SUBCHANNELS" ] || return 1 + + SUBCHANNELS=${SUBCHANNELS%,} + echo "SUBCHANNELS=\"${SUBCHANNELS}\"" + CONFIG_LINE=$(get_config_line_by_subchannel $SUBCHANNELS) + + [ $? -ne 0 -o -z "$CONFIG_LINE" ] && return + + OLD_IFS=$IFS + IFS="," + set -- $CONFIG_LINE + IFS=$OLD_IFS + NETTYPE=$1 + shift + SUBCHANNELS="$1" + OPTIONS="" + shift + while [ $# -gt 0 ]; do + case $1 in + *=*) OPTIONS="$OPTIONS $1";; + esac + shift + done + OPTIONS=${OPTIONS## } + echo "NETTYPE=\"${NETTYPE}\"" + echo "OPTIONS=\"${OPTIONS}\"" +} + + +for netif in $IFACES ; do + [ -e /tmp/ifcfg/ifcfg-$netif ] && continue + # bridge? + unset bridge + unset bond + uuid=$(cat /proc/sys/kernel/random/uuid) + if [ "$netif" = "$bridgename" ]; then + bridge=yes + elif [ "$netif" = "$bondname" ]; then + # $netif can't be bridge and bond at the same time + bond=yes + fi + cat /sys/class/net/$netif/address > /tmp/net.$netif.hwaddr + { + echo "# Generated by dracut initrd" + echo "DEVICE=$netif" + echo "ONBOOT=yes" + echo "NETBOOT=yes" + echo "UUID=$uuid" + [ -n "$mtu" ] && echo "MTU=$mtu" + if [ -f /tmp/net.$netif.lease ]; then + strstr "$ip" '*:*:*' && + echo "IPV6INIT=yes" + echo "DHCPV6C=yes" + echo "BOOTPROTO=dhcp" + cp /tmp/net.$netif.lease /tmp/ifcfg-leases/dhclient-$uuid-$netif.lease + else + # If we've booted with static ip= lines, the override file is there + [ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override + if strstr "$ip" '*:*:*'; then + echo "IPV6INIT=yes" + echo "IPV6_AUTOCONF=no" + echo "IPV6ADDR=$ip/$mask" + else + echo "BOOTPROTO=none" + echo "IPADDR=$ip" + if strstr "$mask" "."; then + echo "NETMASK=$mask" + else + echo "PREFIX=$mask" + fi + fi + if strstr "$gw" '*:*:*'; then + echo "IPV6_DEFAULTGW=$gw" + elif [ -n "$gw" ]; then + echo "GATEWAY=$gw" + fi + fi + } > /tmp/ifcfg/ifcfg-$netif + + # bridge needs different things written to ifcfg + if [ -z "$bridge" ] && [ -z "$bond" ]; then + # standard interface + { + if [ -n "$macaddr" ]; then + echo "MACADDR=$macaddr" + else + echo "HWADDR=\"$(cat /sys/class/net/$netif/address)\"" + fi + print_s390 $netif + echo "TYPE=Ethernet" + echo "NAME=\"Boot Disk\"" + [ -n "$mtu" ] && echo "MTU=$mtu" + } >> /tmp/ifcfg/ifcfg-$netif + fi + + if [ -n "$bond" ] ; then + # bond interface + { + # This variable is an indicator of a bond interface for initscripts + echo "BONDING_OPTS=\"$bondoptions\"" + echo "NAME=\"Boot Disk\"" + } >> /tmp/ifcfg/ifcfg-$netif + + for slave in $bondslaves ; do + # Set ONBOOT=no to prevent initscripts from trying to setup already bonded physical interface + # write separate ifcfg file for the raw eth interface + { + echo "# Generated by dracut initrd" + echo "DEVICE=$slave" + echo "TYPE=Ethernet" + echo "ONBOOT=no" + echo "NETBOOT=yes" + echo "HWADDR=$(cat /sys/class/net/$slave/address)" + echo "SLAVE=yes" + echo "MASTER=$netif" + echo "NAME=$slave" + } >> /tmp/ifcfg/ifcfg-$slave + done + fi + + if [ -n "$bridge" ] ; then + # bridge + { + echo "TYPE=Bridge" + echo "NAME=\"Boot Disk\"" + } >> /tmp/ifcfg/ifcfg-$netif + if [ "$ethname" = "$bondname" ] ; then + { + # Set ONBOOT=no to prevent initscripts from trying to setup already bridged bond interface + echo "# Generated by dracut initrd" + echo "DEVICE=$bondname" + echo "ONBOOT=no" + echo "NETBOOT=yes" + # This variable is an indicator of a bond interface for initscripts + echo "BONDING_OPTS=\"$bondoptions\"" + echo "BRIDGE=$netif" + echo "NAME=\"$bondname\"" + } >> /tmp/ifcfg/ifcfg-$bondname + for slave in $bondslaves ; do + # write separate ifcfg file for the raw eth interface + # Set ONBOOT=no to prevent initscripts from trying to setup already bridged physical interface + { + echo "# Generated by dracut initrd" + echo "DEVICE=$slave" + echo "TYPE=Ethernet" + echo "ONBOOT=no" + echo "NETBOOT=yes" + echo "HWADDR=$(cat /sys/class/net/$slave/address)" + echo "SLAVE=yes" + echo "MASTER=$bondname" + echo "NAME=$slave" + } >> /tmp/ifcfg/ifcfg-$slave + done + else + # write separate ifcfg file for the raw eth interface + { + echo "# Generated by dracut initrd" + echo "DEVICE=$ethname" + echo "TYPE=Ethernet" + echo "ONBOOT=no" + echo "NETBOOT=yes" + echo "HWADDR=$(cat /sys/class/net/$ethname/address)" + echo "BRIDGE=$netif" + echo "NAME=$ethname" + } >> /tmp/ifcfg/ifcfg-$ethname + fi + fi + i=1 + for ns in $(getargs nameserver); do + echo "DNS${i}=${ns}" >> /tmp/ifcfg/ifcfg-$netif + i=$((i+1)) + done +done + +# Pass network opts +mkdir -m 0755 -p /run/initramfs/state/etc/sysconfig/network-scripts +mkdir -m 0755 -p /run/initramfs/state/var/lib/dhclient +echo "files /etc/sysconfig/network-scripts" >> /run/initramfs/rwtab +echo "files /var/lib/dhclient" >> /run/initramfs/rwtab +{ + cp /tmp/net.* /run/initramfs/ + cp /tmp/net.$netif.resolv.conf /run/initramfs/state/etc/resolv.conf + copytree /tmp/ifcfg /run/initramfs/state/etc/sysconfig/network-scripts + cp /tmp/ifcfg-leases/* /run/initramfs/state/var/lib/dhclient +} > /dev/null 2>&1 diff -Naur dracut-024/modules.d/80cms/cms-write-ifcfg.sh dracut-024-magellan/modules.d/80cms/cms-write-ifcfg.sh --- dracut-024/modules.d/80cms/cms-write-ifcfg.sh 2012-10-16 14:31:06.000000000 +0000 +++ dracut-024-magellan/modules.d/80cms/cms-write-ifcfg.sh 2012-10-28 20:26:49.477412947 +0000 @@ -4,7 +4,7 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh -mkdir -m 0755 -p /run/initramfs/state/etc/sysconfig/network-scripts +mkdir -m 0755 -p /run/initramfs/state/etc/conf.d/network-scripts function cms_write_config() { @@ -24,18 +24,18 @@ uuid=$(cat /proc/sys/kernel/random/uuid) - IFCFGFILE=/run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-$DEVICE + IFCFGFILE=/run/initramfs/state/etc/conf.d/network-scripts/ifcfg-$DEVICE strstr "$IPADDR" '*:*:*' && ipv6=1 # to please NetworkManager on startup in loader before loader reconfigures net - cat > /etc/sysconfig/network << EOF + cat > /etc/conf.d/network << EOF HOSTNAME=$HOSTNAME EOF if [ "$ipv6" ]; then - echo "NETWORKING_IPV6=yes" >> /etc/sysconfig/network + echo "NETWORKING_IPV6=yes" >> /etc/conf.d/network else - echo "NETWORKING=yes" >> /etc/sysconfig/network + echo "NETWORKING=yes" >> /etc/conf.d/network fi cat > $IFCFGFILE << EOF @@ -97,7 +97,7 @@ unset optstr unset DNS1 unset DNS2 - echo "files /etc/sysconfig/network-scripts" >> /run/initramfs/rwtab + echo "files /etc/conf.d/network-scripts" >> /run/initramfs/rwtab echo "files /var/lib/dhclient" >> /run/initramfs/rwtab } diff -Naur dracut-024/modules.d/95rootfs-block/mount-root.sh dracut-024-magellan/modules.d/95rootfs-block/mount-root.sh --- dracut-024/modules.d/95rootfs-block/mount-root.sh 2012-10-16 14:31:06.000000000 +0000 +++ dracut-024-magellan/modules.d/95rootfs-block/mount-root.sh 2012-10-28 20:26:49.478412948 +0000 @@ -34,8 +34,8 @@ READONLY= fsckoptions= - if [ -f "$NEWROOT"/etc/sysconfig/readonly-root ]; then - . "$NEWROOT"/etc/sysconfig/readonly-root + if [ -f "$NEWROOT"/etc/conf.d/readonly-root ]; then + . "$NEWROOT"/etc/conf.d/readonly-root fi if getargbool 0 "readonlyroot=" -y readonlyroot; then @@ -58,8 +58,8 @@ if [ -f "$NEWROOT"/forcefsck ] || getargbool 0 forcefsck ; then fsckoptions="-f $fsckoptions" elif [ -f "$NEWROOT"/.autofsck ]; then - [ -f "$NEWROOT"/etc/sysconfig/autofsck ] && \ - . "$NEWROOT"/etc/sysconfig/autofsck + [ -f "$NEWROOT"/etc/conf.d/autofsck ] && \ + . "$NEWROOT"/etc/conf.d/autofsck if [ "$AUTOFSCK_DEF_CHECK" = "yes" ]; then AUTOFSCK_OPT="$AUTOFSCK_OPT -f" fi diff -Naur dracut-024/modules.d/95udev-rules/module-setup.sh dracut-024-magellan/modules.d/95udev-rules/module-setup.sh --- dracut-024/modules.d/95udev-rules/module-setup.sh 2012-10-16 14:31:06.000000000 +0000 +++ dracut-024-magellan/modules.d/95udev-rules/module-setup.sh 2012-10-28 20:26:49.478412948 +0000 @@ -73,6 +73,13 @@ [ -f /etc/arch-release ] && \ inst_script "$moddir/load-modules.sh" /lib/udev/load-modules.sh + # magellan uses a special modprobe script too + if [ -f /etc/mageversion ] + then + [ -e /lib/udev/modprobe.sh ] && dracut_install /lib/udev/modprobe.sh + [ -f /etc/udev/blacklist ] && dracut_install /etc/udev/blacklist + fi + inst_libdir_file "libnss_files*" } diff -Naur dracut-024/modules.d/95udev-rules/module-setup.sh.orig dracut-024-magellan/modules.d/95udev-rules/module-setup.sh.orig --- dracut-024/modules.d/95udev-rules/module-setup.sh.orig 1970-01-01 00:00:00.000000000 +0000 +++ dracut-024-magellan/modules.d/95udev-rules/module-setup.sh.orig 2012-10-16 14:31:06.000000000 +0000 @@ -0,0 +1,78 @@ +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +install() { + local _i + + # Fixme: would be nice if we didn't have to know which rules to grab.... + # ultimately, /lib/initramfs/rules.d or somesuch which includes links/copies + # of the rules we want so that we just copy those in would be best + dracut_install udevadm cat uname blkid \ + /etc/udev/udev.conf + + [ -d ${initdir}/lib/systemd ] || mkdir -p ${initdir}/lib/systemd + for _i in ${systemdutildir}/systemd-udevd ${udevdir}/udevd /lib/systemd/systemd-udevd /sbin/udevd; do + [ -x "$_i" ] || continue + inst "$_i" + + if ! [[ -f ${initdir}/lib/systemd/systemd-udevd ]]; then + ln -fs "$_i" ${initdir}/lib/systemd/systemd-udevd + fi + break + done + if ! [[ -e ${initdir}/lib/systemd/systemd-udevd ]]; then + derror "Cannot find [systemd-]udevd binary!" + exit 1 + fi + + inst_rules 50-udev-default.rules 60-persistent-storage.rules \ + 61-persistent-storage-edd.rules 80-drivers.rules 95-udev-late.rules \ + 60-pcmcia.rules \ + 50-udev.rules 95-late.rules \ + 50-firmware.rules \ + "$moddir/59-persistent-storage.rules" \ + "$moddir/61-persistent-storage.rules" + + inst_dir /run/udev + inst_dir /run/udev/rules.d + + { + for i in cdrom tape dialout floppy; do + if ! egrep -q "^$i:" "$initdir/etc/group" 2>/dev/null; then + if ! egrep "^$i:" /etc/group 2>/dev/null; then + case $i in + cdrom) echo "$i:x:11:";; + dialout) echo "$i:x:18:";; + floppy) echo "$i:x:19:";; + tape) echo "$i:x:33:";; + esac + fi + fi + done + } >> "$initdir/etc/group" + + dracut_install -o \ + ${udevdir}/ata_id \ + ${udevdir}/cdrom_id \ + ${udevdir}/create_floppy_devices \ + ${udevdir}/edd_id \ + ${udevdir}/firmware.sh \ + ${udevdir}/firmware \ + ${udevdir}/firmware.agent \ + ${udevdir}/hotplug.functions \ + ${udevdir}/fw_unit_symlinks.sh \ + ${udevdir}/hid2hci \ + ${udevdir}/path_id \ + ${udevdir}/input_id \ + ${udevdir}/scsi_id \ + ${udevdir}/usb_id \ + ${udevdir}/pcmcia-socket-startup \ + ${udevdir}/pcmcia-check-broken-cis + + [ -f /etc/arch-release ] && \ + inst_script "$moddir/load-modules.sh" /lib/udev/load-modules.sh + + inst_libdir_file "libnss_files*" +} + diff -Naur dracut-024/modules.d/97masterkey/masterkey.sh dracut-024-magellan/modules.d/97masterkey/masterkey.sh --- dracut-024/modules.d/97masterkey/masterkey.sh 2012-10-16 14:31:06.000000000 +0000 +++ dracut-024-magellan/modules.d/97masterkey/masterkey.sh 2012-10-28 20:26:49.478412948 +0000 @@ -8,7 +8,7 @@ # TORSEC group -- http://security.polito.it # Roberto Sassu -MASTERKEYSCONFIG="${NEWROOT}/etc/sysconfig/masterkey" +MASTERKEYSCONFIG="${NEWROOT}/etc/conf.d/masterkey" MULTIKERNELMODE="NO" PCRLOCKNUM=11 diff -Naur dracut-024/modules.d/97masterkey/README dracut-024-magellan/modules.d/97masterkey/README --- dracut-024/modules.d/97masterkey/README 2012-10-16 14:31:06.000000000 +0000 +++ dracut-024-magellan/modules.d/97masterkey/README 2012-10-28 20:26:49.478412948 +0000 @@ -39,7 +39,7 @@ MASTERKEY="/etc/keys/kmk-${MASTERKEYTYPE}.blob" -------------------------------------------------------------------------- -2) create the configuration file '/etc/sysconfig/masterkey' to override the +2) create the configuration file '/etc/conf.d/masterkey' to override the value of one or all variables; 3) specify these parameters in the kernel command line: diff -Naur dracut-024/modules.d/98ecryptfs/ecryptfs-mount.sh dracut-024-magellan/modules.d/98ecryptfs/ecryptfs-mount.sh --- dracut-024/modules.d/98ecryptfs/ecryptfs-mount.sh 2012-10-16 14:31:06.000000000 +0000 +++ dracut-024-magellan/modules.d/98ecryptfs/ecryptfs-mount.sh 2012-10-28 20:26:49.478412948 +0000 @@ -8,7 +8,7 @@ # TORSEC group -- http://security.polito.it # Roberto Sassu -ECRYPTFSCONFIG="${NEWROOT}/etc/sysconfig/ecryptfs" +ECRYPTFSCONFIG="${NEWROOT}/etc/conf.d/ecryptfs" ECRYPTFSKEYTYPE="encrypted" ECRYPTFSKEYDESC="1000100010001000" ECRYPTFSKEYID="" diff -Naur dracut-024/modules.d/98ecryptfs/README dracut-024-magellan/modules.d/98ecryptfs/README --- dracut-024/modules.d/98ecryptfs/README 2012-10-16 14:31:06.000000000 +0000 +++ dracut-024-magellan/modules.d/98ecryptfs/README 2012-10-28 20:26:49.478412948 +0000 @@ -23,13 +23,13 @@ ECRYPTFSKEY="/etc/keys/ecryptfs-trusted.blob" -------------------------------------------------------------------------- -2) create the configuration file '/etc/sysconfig/ecryptfs' and set the ECRYPTFSKEY +2) create the configuration file '/etc/conf.d/ecryptfs' and set the ECRYPTFSKEY variable; 3) specify the eCryptfs key path name in the 'ecryptfskey=' parameter of the kernel command line. -# The configuration file '/etc/sysconfig/ecryptfs' is also used to specify +# The configuration file '/etc/conf.d/ecryptfs' is also used to specify # more options for mounting the eCryptfs filesystem: ECRYPTFSSRCDIR: existent directory in the lower root filesystem; @@ -39,7 +39,7 @@ option is automatically added by the dracut script). # Example of the configuration file: ------------ '/etc/sysconfig/ecryptfs' (with default values) ----------- +----------- '/etc/conf.d/ecryptfs' (with default values) ----------- ECRYPTFS_KEY="/etc/keys/ecryptfs-trusted.blob" ECRYPTFSSRCDIR="/secret" ECRYPTFSDSTDIR="${ECRYPTFSSRCDIR}" diff -Naur dracut-024/modules.d/98integrity/evm-enable.sh dracut-024-magellan/modules.d/98integrity/evm-enable.sh --- dracut-024/modules.d/98integrity/evm-enable.sh 2012-10-16 14:31:06.000000000 +0000 +++ dracut-024-magellan/modules.d/98integrity/evm-enable.sh 2012-10-28 20:26:49.478412948 +0000 @@ -9,7 +9,7 @@ # Roberto Sassu EVMSECFILE="${SECURITYFSDIR}/evm" -EVMCONFIG="${NEWROOT}/etc/sysconfig/evm" +EVMCONFIG="${NEWROOT}/etc/conf.d/evm" EVMKEYDESC="evm-key" EVMKEYTYPE="encrypted" EVMKEYID="" diff -Naur dracut-024/modules.d/98integrity/ima-policy-load.sh dracut-024-magellan/modules.d/98integrity/ima-policy-load.sh --- dracut-024/modules.d/98integrity/ima-policy-load.sh 2012-10-16 14:31:06.000000000 +0000 +++ dracut-024-magellan/modules.d/98integrity/ima-policy-load.sh 2012-10-28 20:26:49.479412949 +0000 @@ -9,8 +9,8 @@ # Roberto Sassu IMASECDIR="${SECURITYFSDIR}/ima" -IMACONFIG="${NEWROOT}/etc/sysconfig/ima" -IMAPOLICY="/etc/sysconfig/ima-policy" +IMACONFIG="${NEWROOT}/etc/conf.d/ima" +IMAPOLICY="/etc/conf.d/ima-policy" load_ima_policy() { diff -Naur dracut-024/modules.d/98integrity/README dracut-024-magellan/modules.d/98integrity/README --- dracut-024/modules.d/98integrity/README 2012-10-16 14:31:06.000000000 +0000 +++ dracut-024-magellan/modules.d/98integrity/README 2012-10-28 20:26:49.479412949 +0000 @@ -20,7 +20,7 @@ EVMKEY="/etc/keys/evm-trusted.blob" -------------------------------------------------------------------------- -2) create the configuration file '/etc/sysconfig/evm' and set the EVMKEY variable; +2) create the configuration file '/etc/conf.d/evm' and set the EVMKEY variable; 3) specify the EVM key path name in the 'evmkey=' parameter of the kernel command line. @@ -33,8 +33,8 @@ # Save the policy in a file. -# Create the configuration file '/etc/sysconfig/ima' to override the path name of +# Create the configuration file '/etc/conf.d/ima' to override the path name of # the IMA custom policy. -------------- '/etc/sysconfig/ima' (with the default value) ------------- -IMAPOLICY="/etc/sysconfig/ima-policy" +------------- '/etc/conf.d/ima' (with the default value) ------------- +IMAPOLICY="/etc/conf.d/ima-policy" ------------------------------------------------------------------------- diff -Naur dracut-024/modules.d/98usrmount/mount-usr.sh dracut-024-magellan/modules.d/98usrmount/mount-usr.sh --- dracut-024/modules.d/98usrmount/mount-usr.sh 2012-10-16 14:31:06.000000000 +0000 +++ dracut-024-magellan/modules.d/98usrmount/mount-usr.sh 2012-10-28 20:26:49.479412949 +0000 @@ -19,7 +19,7 @@ if [ -f "$NEWROOT"/forcefsck ] || getargbool 0 forcefsck ; then _fsckoptions="-f $_fsckoptions" elif [ -f "$NEWROOT"/.autofsck ]; then - [ -f "$NEWROOT"/etc/sysconfig/autofsck ] && . "$NEWROOT"/etc/sysconfig/autofsck + [ -f "$NEWROOT"/etc/conf.d/autofsck ] && . "$NEWROOT"/etc/conf.d/autofsck if [ "$AUTOFSCK_DEF_CHECK" = "yes" ]; then AUTOFSCK_OPT="$AUTOFSCK_OPT -f" fi