Renamed all shell scripts to *.sh
parent
9373aec650
commit
552ecca6db
26
Makefile
26
Makefile
|
@ -31,15 +31,15 @@ install: doc
|
|||
mkdir -p $(DESTDIR)$(sysconfdir)
|
||||
mkdir -p $(DESTDIR)$(pkglibdir)/modules.d
|
||||
mkdir -p $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man7 $(DESTDIR)$(mandir)/man8
|
||||
install -m 0755 dracut $(DESTDIR)$(bindir)/dracut
|
||||
install -m 0755 dracut-gencmdline $(DESTDIR)$(bindir)/dracut-gencmdline
|
||||
install -m 0755 dracut-catimages $(DESTDIR)$(bindir)/dracut-catimages
|
||||
install -m 0755 dracut.sh $(DESTDIR)$(bindir)/dracut
|
||||
install -m 0755 dracut-gencmdline.sh $(DESTDIR)$(bindir)/dracut-gencmdline
|
||||
install -m 0755 dracut-catimages.sh $(DESTDIR)$(bindir)/dracut-catimages
|
||||
install -m 0755 mkinitrd-dracut.sh $(DESTDIR)$(bindir)/mkinitrd
|
||||
install -m 0755 lsinitrd $(DESTDIR)$(bindir)/lsinitrd
|
||||
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 $(DESTDIR)$(pkglibdir)/dracut-functions
|
||||
install -m 0755 dracut-logger $(DESTDIR)$(pkglibdir)/dracut-logger
|
||||
install -m 0755 dracut-functions.sh $(DESTDIR)$(pkglibdir)/dracut-functions.sh
|
||||
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)
|
||||
install -m 0644 dracut.8 $(DESTDIR)$(mandir)/man8/dracut.8
|
||||
|
@ -86,13 +86,13 @@ rpm: dracut-$(VERSION).tar.bz2
|
|||
( mv "$$rpmbuild"/noarch/*.rpm .; mv "$$rpmbuild"/*.src.rpm .;rm -fr "$$rpmbuild"; ls *.rpm )
|
||||
|
||||
syncheck:
|
||||
@ret=0;for i in dracut-initramfs-restore.sh dracut-logger \
|
||||
modules.d/99base/init modules.d/*/*.sh; do \
|
||||
@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; \
|
||||
[ "$${i##*/}" = "caps.sh" ] && continue; \
|
||||
dash -n "$$i" ; ret=$$(($$ret+$$?)); \
|
||||
done;exit $$ret
|
||||
@ret=0;for i in mkinitrd-dracut.sh dracut modules.d/02caps/caps.sh \
|
||||
@ret=0;for i in *.sh mkinitrd-dracut.sh modules.d/02caps/caps.sh \
|
||||
modules.d/*/module-setup.sh; do \
|
||||
bash -n "$$i" ; ret=$$(($$ret+$$?)); \
|
||||
done;exit $$ret
|
||||
|
@ -101,17 +101,17 @@ check: all syncheck
|
|||
$(MAKE) -C test check
|
||||
|
||||
testimage: all
|
||||
./dracut -l -a debug -f test-$(shell uname -r).img $(shell uname -r)
|
||||
./dracut.sh -l -a debug -f test-$(shell uname -r).img $(shell uname -r)
|
||||
@echo wrote test-$(shell uname -r).img
|
||||
|
||||
testimages: all
|
||||
./dracut -l -a debug --kernel-only -f test-kernel-$(shell uname -r).img $(shell uname -r)
|
||||
./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 -l -a debug --no-kernel -f test-dracut.img $(shell uname -r)
|
||||
./dracut.sh -l -a debug --no-kernel -f test-dracut.img $(shell uname -r)
|
||||
@echo wrote test-dracut.img
|
||||
|
||||
hostimage: all
|
||||
./dracut -H -l -a debug -f test-$(shell uname -r).img $(shell uname -r)
|
||||
./dracut.sh -H -l -a debug -f test-$(shell uname -r).img $(shell uname -r)
|
||||
@echo wrote test-$(shell uname -r).img
|
||||
|
||||
AUTHORS:
|
||||
|
|
|
@ -28,7 +28,7 @@ if ! [[ $dracutbasedir ]]; then
|
|||
fi
|
||||
|
||||
if ! type dinfo >/dev/null 2>&1; then
|
||||
. "$dracutbasedir/dracut-logger"
|
||||
. "$dracutbasedir/dracut-logger.sh"
|
||||
dlog_init
|
||||
fi
|
||||
|
|
@ -307,7 +307,7 @@ unset GREP_OPTIONS
|
|||
|
||||
[[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut
|
||||
|
||||
[[ $allowlocal && -f "$(readlink -f ${0%/*})/dracut-functions" ]] && \
|
||||
[[ $allowlocal && -f "$(readlink -f ${0%/*})/dracut-functions.sh" ]] && \
|
||||
dracutbasedir="$(readlink -f ${0%/*})"
|
||||
|
||||
# if we were not passed a config file, try the default one
|
||||
|
@ -436,10 +436,10 @@ fi
|
|||
[[ $hostonly = yes ]] && hostonly="-h"
|
||||
[[ $hostonly != "-h" ]] && unset hostonly
|
||||
|
||||
if [[ -f $dracutbasedir/dracut-functions ]]; then
|
||||
. $dracutbasedir/dracut-functions
|
||||
if [[ -f $dracutbasedir/dracut-functions.sh ]]; then
|
||||
. $dracutbasedir/dracut-functions.sh
|
||||
else
|
||||
echo "Cannot find $dracutbasedir/dracut-functions." >&2
|
||||
echo "Cannot find $dracutbasedir/dracut-functions.sh." >&2
|
||||
echo "Are you running from a git checkout?" >&2
|
||||
echo "Try passing -l as an argument to $0" >&2
|
||||
exit 1
|
||||
|
@ -452,7 +452,7 @@ if (( ${BASH_VERSINFO[0]} < 3 ||
|
|||
exit 1
|
||||
fi
|
||||
|
||||
dracutfunctions=$dracutbasedir/dracut-functions
|
||||
dracutfunctions=$dracutbasedir/dracut-functions.sh
|
||||
export dracutfunctions
|
||||
|
||||
if (( ${#drivers_l[@]} )); then
|
|
@ -221,8 +221,8 @@ rm -rf $RPM_BUILD_ROOT
|
|||
%endif
|
||||
%dir %{dracutlibdir}
|
||||
%dir %{dracutlibdir}/modules.d
|
||||
%{dracutlibdir}/dracut-functions
|
||||
%{dracutlibdir}/dracut-logger
|
||||
%{dracutlibdir}/dracut-functions.sh
|
||||
%{dracutlibdir}/dracut-logger.sh
|
||||
%{dracutlibdir}/dracut-initramfs-restore
|
||||
%config(noreplace) /etc/dracut.conf
|
||||
%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} > 6
|
||||
|
|
|
@ -84,7 +84,7 @@ install() {
|
|||
install_base() {
|
||||
dracut_install setfont loadkeys kbd_mode stty
|
||||
|
||||
inst ${moddir}/console_init /lib/udev/console_init
|
||||
inst ${moddir}/console_init.sh /lib/udev/console_init
|
||||
inst_rules ${moddir}/10-console.rules
|
||||
inst_hook cmdline 20 "${moddir}/parse-i18n.sh"
|
||||
}
|
||||
|
|
|
@ -73,9 +73,9 @@ install() {
|
|||
local _arch _i _dir
|
||||
dracut_install ip arping tr dhclient
|
||||
dracut_install -o brctl ifenslave
|
||||
inst "$moddir/ifup" "/sbin/ifup"
|
||||
inst "$moddir/netroot" "/sbin/netroot"
|
||||
inst "$moddir/dhclient-script" "/sbin/dhclient-script"
|
||||
inst "$moddir/ifup.sh" "/sbin/ifup"
|
||||
inst "$moddir/netroot.sh" "/sbin/netroot"
|
||||
inst "$moddir/dhclient-script.sh" "/sbin/dhclient-script"
|
||||
inst "$moddir/net-lib.sh" "/lib/net-lib.sh"
|
||||
inst_simple "$moddir/dhclient.conf" "/etc/dhclient.conf"
|
||||
inst_hook pre-udev 50 "$moddir/ifname-genrules.sh"
|
||||
|
|
|
@ -38,7 +38,7 @@ install() {
|
|||
if grep -q nash /usr/libexec/plymouth/plymouth-populate-initrd \
|
||||
|| ! grep -q PLYMOUTH_POPULATE_SOURCE_FUNCTIONS /usr/libexec/plymouth/plymouth-populate-initrd \
|
||||
|| [ ! -x /usr/libexec/plymouth/plymouth-populate-initrd ]; then
|
||||
. "$moddir"/plymouth-populate-initrd
|
||||
. "$moddir"/plymouth-populate-initrd.sh
|
||||
else
|
||||
PLYMOUTH_POPULATE_SOURCE_FUNCTIONS="$dracutfunctions" \
|
||||
/usr/libexec/plymouth/plymouth-populate-initrd -t $initdir
|
||||
|
|
|
@ -35,7 +35,7 @@ install() {
|
|||
inst_hook pre-udev 30 "$moddir/dmsquash-live-genrules.sh"
|
||||
inst_hook pre-udev 30 "$moddir/dmsquash-liveiso-genrules.sh"
|
||||
inst_hook pre-pivot 20 "$moddir/apply-live-updates.sh"
|
||||
inst "$moddir/dmsquash-live-root" "/sbin/dmsquash-live-root"
|
||||
inst "$moddir/dmsquash-live-root.sh" "/sbin/dmsquash-live-root"
|
||||
# should probably just be generally included
|
||||
inst_rules 60-cdrom_id.rules
|
||||
}
|
||||
|
|
|
@ -12,6 +12,6 @@ depends() {
|
|||
|
||||
install() {
|
||||
inst_hook cmdline 29 "$moddir/parse-livenet.sh"
|
||||
inst "$moddir/livenetroot" "/sbin/livenetroot"
|
||||
inst "$moddir/livenetroot.sh" "/sbin/livenetroot"
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ install() {
|
|||
|
||||
mkdir -m 0755 -p "$initdir/var/lib/lldpad"
|
||||
|
||||
inst "$moddir/fcoe-up" "/sbin/fcoe-up"
|
||||
inst "$moddir/fcoe-up.sh" "/sbin/fcoe-up"
|
||||
inst "$moddir/fcoe-edd.sh" "/sbin/fcoe-edd"
|
||||
inst "$moddir/fcoe-genrules.sh" "/sbin/fcoe-genrules.sh"
|
||||
inst_hook cmdline 99 "$moddir/parse-fcoe.sh"
|
||||
|
|
|
@ -64,6 +64,6 @@ install() {
|
|||
inst iscsi-iname
|
||||
inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh"
|
||||
inst_hook pre-pivot 90 "$moddir/cleanup-iscsi.sh"
|
||||
inst "$moddir/iscsiroot" "/sbin/iscsiroot"
|
||||
inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot"
|
||||
inst "$moddir/mount-lun.sh" "/bin/mount-lun.sh"
|
||||
}
|
||||
|
|
|
@ -34,6 +34,6 @@ install() {
|
|||
inst nbd-client
|
||||
inst_hook cmdline 90 "$moddir/parse-nbdroot.sh"
|
||||
|
||||
inst "$moddir/nbdroot" "/sbin/nbdroot"
|
||||
inst "$moddir/nbdroot.sh" "/sbin/nbdroot"
|
||||
}
|
||||
|
||||
|
|
|
@ -24,15 +24,16 @@ netroot_to_var() {
|
|||
server=$2; port=$3;
|
||||
}
|
||||
|
||||
# Don't continue if root is ok
|
||||
[ -n "$rootok" ] && return
|
||||
|
||||
# This script is sourced, so root should be set. But let's be paranoid
|
||||
[ -z "$root" ] && root=$(getarg root=)
|
||||
[ -z "$netroot" ] && netroot=$(getarg netroot=)
|
||||
|
||||
# Root takes precedence over netroot
|
||||
if [ "${root%%:*}" = "nbd" ] ; then
|
||||
|
||||
# Don't continue if root is ok
|
||||
[ -n "$rootok" ] && return
|
||||
|
||||
if [ -n "$netroot" ] ; then
|
||||
warn "root takes precedence over netroot. Ignoring netroot"
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ install() {
|
|||
inst_hook cmdline 90 "$moddir/parse-nfsroot.sh"
|
||||
inst_hook pre-udev 99 "$moddir/nfs-start-rpc.sh"
|
||||
inst_hook pre-pivot 99 "$moddir/nfsroot-cleanup.sh"
|
||||
inst "$moddir/nfsroot" "/sbin/nfsroot"
|
||||
inst "$moddir/nfsroot.sh" "/sbin/nfsroot"
|
||||
inst "$moddir/nfs-lib.sh" "/lib/nfs-lib.sh"
|
||||
mkdir -m 0755 -p "$initdir/var/lib/nfs/rpc_pipefs"
|
||||
mkdir -m 0755 -p "$initdir/var/lib/rpcbind"
|
||||
|
|
|
@ -26,9 +26,9 @@ install() {
|
|||
egrep '^root:' "$initdir/etc/passwd" 2>/dev/null || echo 'root:x:0:0::/root:/bin/sh' >> "$initdir/etc/passwd"
|
||||
egrep '^nobody:' /etc/passwd >> "$initdir/etc/passwd"
|
||||
# install our scripts and hooks
|
||||
inst "$moddir/init" "/init"
|
||||
inst "$moddir/initqueue" "/sbin/initqueue"
|
||||
inst "$moddir/loginit" "/sbin/loginit"
|
||||
inst "$moddir/init.sh" "/init"
|
||||
inst "$moddir/initqueue.sh" "/sbin/initqueue"
|
||||
inst "$moddir/loginit.sh" "/sbin/loginit"
|
||||
|
||||
[ -e "${initdir}/lib" ] || mkdir -m 0755 -p ${initdir}/lib
|
||||
mkdir -m 0755 -p ${initdir}/lib/dracut
|
||||
|
|
|
@ -16,7 +16,7 @@ install() {
|
|||
dracut_install umount
|
||||
dracut_install poweroff reboot halt
|
||||
dracut_install -o kexec
|
||||
inst "$moddir/shutdown" "$prefix/shutdown"
|
||||
inst "$moddir/shutdown.sh" "$prefix/shutdown"
|
||||
[ -e "${initdir}/lib" ] || mkdir -m 0755 -p ${initdir}/lib
|
||||
mkdir -m 0755 -p ${initdir}/lib/dracut
|
||||
mkdir -m 0755 -p ${initdir}/lib/dracut/hooks
|
||||
|
|
|
@ -26,7 +26,7 @@ test_setup() {
|
|||
(
|
||||
initdir=$TESTDIR/overlay/source
|
||||
mkdir -p $initdir
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \
|
||||
mount dmesg ifconfig dhclient mkdir cp ping dhclient \
|
||||
umount strace less
|
||||
|
@ -37,7 +37,7 @@ test_setup() {
|
|||
inst "$basedir/modules.d/40network/dhclient-script" "/sbin/dhclient-script"
|
||||
inst "$basedir/modules.d/40network/ifup" "/sbin/ifup"
|
||||
dracut_install grep
|
||||
inst ./test-init /sbin/init
|
||||
inst ./test-init.sh /sbin/init
|
||||
find_binary plymouth >/dev/null && dracut_install plymouth
|
||||
(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
|
||||
cp -a /etc/ld.so.conf* $initdir/etc
|
||||
|
@ -47,7 +47,7 @@ test_setup() {
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sfdisk mkfs.ext3 poweroff cp umount
|
||||
inst_hook initqueue 01 ./create-root.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
@ -56,7 +56,7 @@ test_setup() {
|
|||
# create an initramfs that will create the target root filesystem.
|
||||
# We do it this way so that we do not risk trashing the host mdraid
|
||||
# devices, volume groups, encrypted partitions, etc.
|
||||
$basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-m "dash udev-rules base rootfs-block kernel-modules" \
|
||||
-d "piix ide-gd_mod ata_piix ext3 sd_mod" \
|
||||
--nomdadmconf \
|
||||
|
@ -75,12 +75,12 @@ test_setup() {
|
|||
|
||||
(
|
||||
initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
)
|
||||
sudo $basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-a "debug" \
|
||||
-d "piix ide-gd_mod ata_piix ext3 sd_mod" \
|
||||
-f $TESTDIR/initramfs.testing $KVERSION || return 1
|
||||
|
|
|
@ -27,14 +27,14 @@ test_setup() {
|
|||
(
|
||||
initdir=$TESTDIR/overlay/source
|
||||
(mkdir -p "$initdir"; cd "$initdir"; mkdir -p dev sys proc etc var/run tmp run)
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \
|
||||
mount dmesg ifconfig dhclient mkdir cp ping dhclient
|
||||
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
||||
[ -f ${_terminfodir}/l/linux ] && break
|
||||
done
|
||||
dracut_install -o ${_terminfodir}/l/linux
|
||||
inst ./test-init /sbin/init
|
||||
inst ./test-init.sh /sbin/init
|
||||
inst "$basedir/modules.d/40network/dhclient-script" "/sbin/dhclient-script"
|
||||
inst "$basedir/modules.d/40network/ifup" "/sbin/ifup"
|
||||
dracut_install grep
|
||||
|
@ -47,7 +47,7 @@ test_setup() {
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sfdisk mke2fs poweroff cp umount
|
||||
inst_hook initqueue 01 ./create-root.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
@ -56,7 +56,7 @@ test_setup() {
|
|||
# create an initramfs that will create the target root filesystem.
|
||||
# We do it this way so that we do not risk trashing the host mdraid
|
||||
# devices, volume groups, encrypted partitions, etc.
|
||||
$basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-m "dash crypt lvm mdraid udev-rules base rootfs-block kernel-modules" \
|
||||
-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
|
||||
--nomdadmconf \
|
||||
|
@ -73,13 +73,13 @@ test_setup() {
|
|||
|
||||
(
|
||||
initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst ./cryptroot-ask /sbin/cryptroot-ask
|
||||
inst ./cryptroot-ask.sh /sbin/cryptroot-ask
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
)
|
||||
sudo $basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-o "plymouth network" \
|
||||
-a "debug" \
|
||||
-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
|
||||
|
|
|
@ -24,7 +24,7 @@ test_setup() {
|
|||
# Create what will eventually be our root filesystem onto an overlay
|
||||
(
|
||||
initdir=$TESTDIR/overlay/source
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \
|
||||
mount dmesg ifconfig dhclient mkdir cp ping dhclient
|
||||
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
||||
|
@ -34,7 +34,7 @@ test_setup() {
|
|||
inst "$basedir/modules.d/40network/dhclient-script" "/sbin/dhclient-script"
|
||||
inst "$basedir/modules.d/40network/ifup" "/sbin/ifup"
|
||||
dracut_install grep
|
||||
inst ./test-init /sbin/init
|
||||
inst ./test-init.sh /sbin/init
|
||||
find_binary plymouth >/dev/null && dracut_install plymouth
|
||||
(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
|
||||
cp -a /etc/ld.so.conf* $initdir/etc
|
||||
|
@ -45,7 +45,7 @@ test_setup() {
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sfdisk mke2fs poweroff cp umount
|
||||
inst_hook initqueue 01 ./create-root.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
@ -54,7 +54,7 @@ test_setup() {
|
|||
# create an initramfs that will create the target root filesystem.
|
||||
# We do it this way so that we do not risk trashing the host mdraid
|
||||
# devices, volume groups, encrypted partitions, etc.
|
||||
$basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-m "dash lvm mdraid udev-rules base rootfs-block kernel-modules" \
|
||||
-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
|
||||
-f $TESTDIR/initramfs.makeroot $KVERSION || return 1
|
||||
|
@ -67,12 +67,12 @@ test_setup() {
|
|||
grep -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1
|
||||
(
|
||||
initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
)
|
||||
sudo $basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-o "plymouth network" \
|
||||
-a "debug" \
|
||||
-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
|
||||
|
|
|
@ -59,7 +59,7 @@ test_setup() {
|
|||
# Create what will eventually be our root filesystem onto an overlay
|
||||
(
|
||||
initdir=$TESTDIR/overlay/source
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \
|
||||
mount dmesg ifconfig dhclient mkdir cp ping dhclient
|
||||
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
||||
|
@ -69,7 +69,7 @@ test_setup() {
|
|||
inst "$basedir/modules.d/40network/dhclient-script" "/sbin/dhclient-script"
|
||||
inst "$basedir/modules.d/40network/ifup" "/sbin/ifup"
|
||||
dracut_install grep
|
||||
inst ./test-init /sbin/init
|
||||
inst ./test-init.sh /sbin/init
|
||||
find_binary plymouth >/dev/null && dracut_install plymouth
|
||||
(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
|
||||
cp -a /etc/ld.so.conf* $initdir/etc
|
||||
|
@ -79,7 +79,7 @@ test_setup() {
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sfdisk mke2fs poweroff cp umount dd grep
|
||||
inst_hook initqueue 01 ./create-root.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
@ -88,7 +88,7 @@ test_setup() {
|
|||
# create an initramfs that will create the target root filesystem.
|
||||
# We do it this way so that we do not risk trashing the host mdraid
|
||||
# devices, volume groups, encrypted partitions, etc.
|
||||
$basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-m "dash crypt lvm mdraid udev-rules base rootfs-block kernel-modules" \
|
||||
-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
|
||||
-f $TESTDIR/initramfs.makeroot $KVERSION || return 1
|
||||
|
@ -107,15 +107,15 @@ test_setup() {
|
|||
eval $(grep --binary-files=text -m 1 MD_UUID $TESTDIR/root.ext2)
|
||||
(
|
||||
initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
inst ./cryptroot-ask /sbin/cryptroot-ask
|
||||
inst ./cryptroot-ask.sh /sbin/cryptroot-ask
|
||||
mkdir -p $initdir/etc
|
||||
echo "ARRAY /dev/md0 level=raid5 num-devices=3 UUID=$MD_UUID" > $initdir/etc/mdadm.conf
|
||||
)
|
||||
sudo $basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-o "plymouth network" \
|
||||
-a "debug" \
|
||||
-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
|
||||
|
|
|
@ -60,7 +60,7 @@ test_setup() {
|
|||
# Create what will eventually be our root filesystem onto an overlay
|
||||
(
|
||||
initdir=$TESTDIR/overlay/source
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \
|
||||
mount dmesg ifconfig dhclient mkdir cp ping dhclient
|
||||
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
||||
|
@ -70,7 +70,7 @@ test_setup() {
|
|||
inst "$basedir/modules.d/40network/dhclient-script" "/sbin/dhclient-script"
|
||||
inst "$basedir/modules.d/40network/ifup" "/sbin/ifup"
|
||||
dracut_install grep
|
||||
inst ./test-init /sbin/init
|
||||
inst ./test-init.sh /sbin/init
|
||||
find_binary plymouth >/dev/null && dracut_install plymouth
|
||||
(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
|
||||
cp -a /etc/ld.so.conf* $initdir/etc
|
||||
|
@ -80,7 +80,7 @@ test_setup() {
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sfdisk mke2fs poweroff cp umount grep
|
||||
inst_hook initqueue 01 ./create-root.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
@ -89,7 +89,7 @@ test_setup() {
|
|||
# create an initramfs that will create the target root filesystem.
|
||||
# We do it this way so that we do not risk trashing the host mdraid
|
||||
# devices, volume groups, encrypted partitions, etc.
|
||||
$basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-m "dash crypt lvm mdraid udev-rules base rootfs-block kernel-modules" \
|
||||
-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
|
||||
-f $TESTDIR/initramfs.makeroot $KVERSION || return 1
|
||||
|
@ -109,13 +109,13 @@ test_setup() {
|
|||
|
||||
(
|
||||
initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
inst ./cryptroot-ask /sbin/cryptroot-ask
|
||||
inst ./cryptroot-ask.sh /sbin/cryptroot-ask
|
||||
)
|
||||
sudo $basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-o "plymouth network" \
|
||||
-a "debug" \
|
||||
-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
|
||||
|
|
|
@ -26,7 +26,7 @@ test_setup() {
|
|||
# Create what will eventually be our root filesystem onto an overlay
|
||||
(
|
||||
initdir=$TESTDIR/overlay/source
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \
|
||||
mount dmesg ifconfig dhclient mkdir cp ping dhclient
|
||||
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
||||
|
@ -36,7 +36,7 @@ test_setup() {
|
|||
inst "$basedir/modules.d/40network/dhclient-script" "/sbin/dhclient-script"
|
||||
inst "$basedir/modules.d/40network/ifup" "/sbin/ifup"
|
||||
dracut_install grep
|
||||
inst ./test-init /sbin/init
|
||||
inst ./test-init.sh /sbin/init
|
||||
find_binary plymouth >/dev/null && dracut_install plymouth
|
||||
(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
|
||||
cp -a /etc/ld.so.conf* $initdir/etc
|
||||
|
@ -46,7 +46,7 @@ test_setup() {
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sfdisk mkfs.btrfs poweroff cp umount
|
||||
inst_hook initqueue 01 ./create-root.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
@ -55,7 +55,7 @@ test_setup() {
|
|||
# create an initramfs that will create the target root filesystem.
|
||||
# We do it this way so that we do not risk trashing the host mdraid
|
||||
# devices, volume groups, encrypted partitions, etc.
|
||||
$basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-m "dash btrfs udev-rules base rootfs-block kernel-modules" \
|
||||
-d "piix ide-gd_mod ata_piix btrfs sd_mod" \
|
||||
--nomdadmconf \
|
||||
|
@ -75,13 +75,13 @@ test_setup() {
|
|||
|
||||
(
|
||||
initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst ./cryptroot-ask /sbin/cryptroot-ask
|
||||
inst ./cryptroot-ask.sh /sbin/cryptroot-ask
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
)
|
||||
sudo $basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-o "plymouth network" \
|
||||
-a "debug" \
|
||||
-d "piix ide-gd_mod ata_piix btrfs sd_mod" \
|
||||
|
|
|
@ -22,7 +22,7 @@ test_setup() {
|
|||
mkdir -p $TESTDIR/overlay
|
||||
(
|
||||
initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
@ -30,7 +30,7 @@ test_setup() {
|
|||
|
||||
dd if=/dev/zero of=$TESTDIR/root.img count=100
|
||||
|
||||
sudo $basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-a "debug dmsquash-live" \
|
||||
-d "piix ide-gd_mod ata_piix ext3 sd_mod" \
|
||||
-f $TESTDIR/initramfs.testing $KVERSION || return 1
|
||||
|
@ -40,7 +40,7 @@ test_setup() {
|
|||
# Create what will eventually be our root filesystem onto an overlay
|
||||
(
|
||||
initdir=$TESTDIR/root-source
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \
|
||||
mount dmesg ifconfig dhclient mkdir cp ping dhclient \
|
||||
umount strace less
|
||||
|
@ -54,7 +54,7 @@ test_setup() {
|
|||
for f in /usr/share/syslinux/*; do
|
||||
inst_simple "$f"
|
||||
done
|
||||
inst ./test-init /sbin/init
|
||||
inst ./test-init.sh /sbin/init
|
||||
inst $TESTDIR/initramfs.testing "/boot/initramfs-$KVERSION.img"
|
||||
inst /boot/vmlinuz-$KVERSION
|
||||
find_binary plymouth >/dev/null && dracut_install plymouth
|
||||
|
|
|
@ -211,7 +211,7 @@ test_setup() {
|
|||
kernel=$KVERSION
|
||||
(
|
||||
initdir=$TESTDIR/mnt
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sh ls shutdown poweroff stty cat ps ln ip \
|
||||
dmesg mkdir cp ping exportfs \
|
||||
modprobe rpc.nfsd rpc.mountd showmount tcpdump \
|
||||
|
@ -226,7 +226,7 @@ test_setup() {
|
|||
type -P dhcpd >/dev/null && dracut_install dhcpd
|
||||
[ -x /usr/sbin/dhcpd3 ] && inst /usr/sbin/dhcpd3 /usr/sbin/dhcpd
|
||||
instmods nfsd sunrpc ipv6
|
||||
inst ./server-init /sbin/init
|
||||
inst ./server-init.sh /sbin/init
|
||||
inst ./hosts /etc/hosts
|
||||
inst ./exports /etc/exports
|
||||
inst ./dhcpd.conf /etc/dhcpd.conf
|
||||
|
@ -263,14 +263,14 @@ test_setup() {
|
|||
mkdir -p $initdir
|
||||
|
||||
(
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sh shutdown poweroff stty cat ps ln ip \
|
||||
mount dmesg mkdir cp ping grep
|
||||
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
||||
[ -f ${_terminfodir}/l/linux ] && break
|
||||
done
|
||||
dracut_install -o ${_terminfodir}/l/linux
|
||||
inst ./client-init /sbin/init
|
||||
inst ./client-init.sh /sbin/init
|
||||
(
|
||||
cd "$initdir"
|
||||
mkdir -p dev sys proc etc
|
||||
|
@ -298,20 +298,20 @@ test_setup() {
|
|||
(
|
||||
initdir=$TESTDIR/overlay
|
||||
mkdir $TESTDIR/overlay
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
)
|
||||
|
||||
# Make server's dracut image
|
||||
$basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-m "dash udev-rules base rootfs-block debug kernel-modules" \
|
||||
-d "piix ide-gd_mod ata_piix ext2 sd_mod e1000" \
|
||||
-f $TESTDIR/initramfs.server $KVERSION || return 1
|
||||
|
||||
# Make client's dracut image
|
||||
$basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-o "plymouth" \
|
||||
-a "debug" \
|
||||
-d "piix ide-gd_mod ata_piix sd_mod e1000 nfs sunrpc" \
|
||||
|
|
|
@ -103,14 +103,14 @@ test_setup() {
|
|||
# Create what will eventually be our root filesystem onto an overlay
|
||||
(
|
||||
initdir=$TESTDIR/overlay/source
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sh shutdown poweroff stty cat ps ln ip \
|
||||
mount dmesg mkdir cp ping grep
|
||||
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
||||
[ -f ${_terminfodir}/l/linux ] && break
|
||||
done
|
||||
dracut_install -o ${_terminfodir}/l/linux
|
||||
inst ./client-init /sbin/init
|
||||
inst ./client-init.sh /sbin/init
|
||||
(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
|
||||
cp -a /etc/ld.so.conf* $initdir/etc
|
||||
sudo ldconfig -r "$initdir"
|
||||
|
@ -119,7 +119,7 @@ test_setup() {
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sfdisk mke2fs poweroff cp umount
|
||||
inst_hook initqueue 01 ./create-root.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
@ -128,7 +128,7 @@ test_setup() {
|
|||
# create an initramfs that will create the target root filesystem.
|
||||
# We do it this way so that we do not risk trashing the host mdraid
|
||||
# devices, volume groups, encrypted partitions, etc.
|
||||
$basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-m "dash crypt lvm mdraid udev-rules base rootfs-block kernel-modules" \
|
||||
-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
|
||||
-f $TESTDIR/initramfs.makeroot $KVERSION || return 1
|
||||
|
@ -154,12 +154,12 @@ test_setup() {
|
|||
rm $TESTDIR/client.img
|
||||
(
|
||||
initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
)
|
||||
sudo $basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-o "plymouth dmraid" \
|
||||
-a "debug" \
|
||||
-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
|
||||
|
@ -174,7 +174,7 @@ test_setup() {
|
|||
kernel=$KVERSION
|
||||
(
|
||||
initdir=$TESTDIR/mnt
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
(
|
||||
cd "$initdir";
|
||||
mkdir -p dev sys proc etc var/run tmp var/lib/dhcpd /etc/iscsi
|
||||
|
@ -194,7 +194,7 @@ test_setup() {
|
|||
[ -f /etc/netconfig ] && dracut_install /etc/netconfig
|
||||
type -P dhcpd >/dev/null && dracut_install dhcpd
|
||||
[ -x /usr/sbin/dhcpd3 ] && inst /usr/sbin/dhcpd3 /usr/sbin/dhcpd
|
||||
inst ./server-init /sbin/init
|
||||
inst ./server-init.sh /sbin/init
|
||||
inst ./hosts /etc/hosts
|
||||
inst ./dhcpd.conf /etc/dhcpd.conf
|
||||
dracut_install /etc/nsswitch.conf /etc/rpc /etc/protocols
|
||||
|
@ -209,7 +209,7 @@ test_setup() {
|
|||
rm -fr $TESTDIR/mnt
|
||||
|
||||
# Make server's dracut image
|
||||
$basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-m "dash udev-rules base rootfs-block debug kernel-modules" \
|
||||
-d "piix ide-gd_mod ata_piix ext2 sd_mod e1000" \
|
||||
-f $TESTDIR/initramfs.server $KVERSION || return 1
|
||||
|
|
|
@ -193,14 +193,14 @@ make_encrypted_root() {
|
|||
initdir=$TESTDIR/overlay/source
|
||||
mkdir -p "$initdir"
|
||||
(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sh df free ls shutdown poweroff stty cat ps ln ip \
|
||||
mount dmesg mkdir cp ping
|
||||
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
||||
[ -f ${_terminfodir}/l/linux ] && break
|
||||
done
|
||||
dracut_install -o ${_terminfodir}/l/linux
|
||||
inst ./client-init /sbin/init
|
||||
inst ./client-init.sh /sbin/init
|
||||
find_binary plymouth >/dev/null && dracut_install plymouth
|
||||
cp -a /etc/ld.so.conf* $initdir/etc
|
||||
sudo ldconfig -r "$initdir"
|
||||
|
@ -209,7 +209,7 @@ make_encrypted_root() {
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install mke2fs poweroff cp umount tune2fs
|
||||
inst_hook initqueue 01 ./create-root.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
@ -218,7 +218,7 @@ make_encrypted_root() {
|
|||
# create an initramfs that will create the target root filesystem.
|
||||
# We do it this way so that we do not risk trashing the host mdraid
|
||||
# devices, volume groups, encrypted partitions, etc.
|
||||
$basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-m "dash crypt lvm mdraid udev-rules base rootfs-block kernel-modules" \
|
||||
-d "piix ide-gd_mod ata_piix ext2 ext3 sd_mod" \
|
||||
-f $TESTDIR/initramfs.makeroot $KVERSION || return 1
|
||||
|
@ -245,7 +245,7 @@ make_client_root() {
|
|||
kernel=$KVERSION
|
||||
(
|
||||
initdir=$TESTDIR/mnt
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
mkdir -p "$initdir"
|
||||
(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
|
||||
dracut_install sh ls shutdown poweroff stty cat ps ln ip \
|
||||
|
@ -254,7 +254,7 @@ make_client_root() {
|
|||
[ -f ${_terminfodir}/l/linux ] && break
|
||||
done
|
||||
dracut_install -o ${_terminfodir}/l/linux
|
||||
inst ./client-init /sbin/init
|
||||
inst ./client-init.sh /sbin/init
|
||||
inst /etc/nsswitch.conf /etc/nsswitch.conf
|
||||
inst /etc/passwd /etc/passwd
|
||||
inst /etc/group /etc/group
|
||||
|
@ -279,7 +279,7 @@ make_server_root() {
|
|||
kernel=$KVERSION
|
||||
(
|
||||
initdir=$TESTDIR/mnt
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
mkdir -p "$initdir"
|
||||
(
|
||||
cd "$initdir";
|
||||
|
@ -294,7 +294,7 @@ make_server_root() {
|
|||
dracut_install -o ${_terminfodir}/l/linux
|
||||
type -P dhcpd >/dev/null && dracut_install dhcpd
|
||||
[ -x /usr/sbin/dhcpd3 ] && inst /usr/sbin/dhcpd3 /usr/sbin/dhcpd
|
||||
inst ./server-init /sbin/init
|
||||
inst ./server-init.sh /sbin/init
|
||||
inst ./hosts /etc/hosts
|
||||
inst ./dhcpd.conf /etc/dhcpd.conf
|
||||
inst /etc/nsswitch.conf /etc/nsswitch.conf
|
||||
|
@ -324,19 +324,19 @@ test_setup() {
|
|||
# Make the test image
|
||||
(
|
||||
initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
inst ./cryptroot-ask /sbin/cryptroot-ask
|
||||
inst ./cryptroot-ask.sh /sbin/cryptroot-ask
|
||||
)
|
||||
|
||||
sudo $basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-m "dash udev-rules rootfs-block base debug kernel-modules" \
|
||||
-d "piix ide-gd_mod ata_piix ext2 ext3 sd_mod e1000" \
|
||||
-f $TESTDIR/initramfs.server $KVERSION || return 1
|
||||
|
||||
sudo $basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-o "plymouth" \
|
||||
-a "debug" \
|
||||
-d "piix ide-gd_mod ata_piix ext2 ext3 sd_mod e1000" \
|
||||
|
|
|
@ -130,7 +130,7 @@ test_setup() {
|
|||
kernel=$KVERSION
|
||||
(
|
||||
initdir=$TESTDIR/mnt
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sh ls shutdown poweroff stty cat ps ln ip \
|
||||
dmesg mkdir cp ping exportfs \
|
||||
modprobe rpc.nfsd rpc.mountd showmount tcpdump \
|
||||
|
@ -145,7 +145,7 @@ test_setup() {
|
|||
type -P dhcpd >/dev/null && dracut_install dhcpd
|
||||
[ -x /usr/sbin/dhcpd3 ] && inst /usr/sbin/dhcpd3 /usr/sbin/dhcpd
|
||||
instmods nfsd sunrpc ipv6
|
||||
inst ./server-init /sbin/init
|
||||
inst ./server-init.sh /sbin/init
|
||||
inst ./hosts /etc/hosts
|
||||
inst ./exports /etc/exports
|
||||
inst ./dhcpd.conf /etc/dhcpd.conf
|
||||
|
@ -191,7 +191,7 @@ test_setup() {
|
|||
mkdir -p $initdir
|
||||
|
||||
(
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sh shutdown poweroff stty cat ps ln ip \
|
||||
mount dmesg mkdir \
|
||||
cp ping grep ls
|
||||
|
@ -199,7 +199,7 @@ test_setup() {
|
|||
[ -f ${_terminfodir}/l/linux ] && break
|
||||
done
|
||||
dracut_install -o ${_terminfodir}/l/linux
|
||||
inst ./client-init /sbin/init
|
||||
inst ./client-init.sh /sbin/init
|
||||
(
|
||||
cd "$initdir"
|
||||
mkdir -p dev sys proc etc run
|
||||
|
@ -223,20 +223,20 @@ test_setup() {
|
|||
(
|
||||
initdir=$TESTDIR/overlay
|
||||
mkdir $TESTDIR/overlay
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
)
|
||||
|
||||
# Make server's dracut image
|
||||
$basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-m "dash udev-rules base rootfs-block debug kernel-modules" \
|
||||
-d "piix ide-gd_mod ata_piix ext2 sd_mod e1000" \
|
||||
-f $TESTDIR/initramfs.server $KVERSION || return 1
|
||||
|
||||
# Make client's dracut image
|
||||
$basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-o "plymouth" \
|
||||
-a "debug" \
|
||||
-d "piix sd_mod sr_mod ata_piix ide-gd_mod e1000 nfs sunrpc" \
|
||||
|
|
|
@ -58,7 +58,7 @@ test_setup() {
|
|||
# Create what will eventually be our root filesystem onto an overlay
|
||||
(
|
||||
initdir=$TESTDIR/overlay/source
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \
|
||||
mount dmesg ifconfig dhclient mkdir cp ping dhclient
|
||||
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
||||
|
@ -68,7 +68,7 @@ test_setup() {
|
|||
inst "$basedir/modules.d/40network/dhclient-script" "/sbin/dhclient-script"
|
||||
inst "$basedir/modules.d/40network/ifup" "/sbin/ifup"
|
||||
dracut_install grep
|
||||
inst ./test-init /sbin/init
|
||||
inst ./test-init.sh /sbin/init
|
||||
find_binary plymouth >/dev/null && dracut_install plymouth
|
||||
(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
|
||||
cp -a /etc/ld.so.conf* $initdir/etc
|
||||
|
@ -79,7 +79,7 @@ test_setup() {
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install sfdisk mke2fs poweroff cp umount
|
||||
inst_hook initqueue 01 ./create-root.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
@ -88,7 +88,7 @@ test_setup() {
|
|||
# create an initramfs that will create the target root filesystem.
|
||||
# We do it this way so that we do not risk trashing the host mdraid
|
||||
# devices, volume groups, encrypted partitions, etc.
|
||||
$basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-m "dash lvm mdraid dmraid udev-rules base rootfs-block kernel-modules" \
|
||||
-d "piix ide-gd_mod ata_piix ext2 sd_mod dm-multipath dm-crypt dm-round-robin faulty linear multipath raid0 raid10 raid1 raid456" \
|
||||
-f $TESTDIR/initramfs.makeroot $KVERSION || return 1
|
||||
|
@ -105,12 +105,12 @@ test_setup() {
|
|||
grep -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1
|
||||
(
|
||||
initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions
|
||||
. $basedir/dracut-functions.sh
|
||||
dracut_install poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
)
|
||||
sudo $basedir/dracut -l -i $TESTDIR/overlay / \
|
||||
sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||
-o "plymouth network" \
|
||||
-a "debug" \
|
||||
-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
|
||||
|
|
Loading…
Reference in New Issue