|
|
712866 |
From 1211a10b959fea039f4c8718c3901ad63e4816d3 Mon Sep 17 00:00:00 2001
|
|
|
712866 |
From: Harald Hoyer <harald@redhat.com>
|
|
|
712866 |
Date: Thu, 2 Jul 2015 15:40:13 +0200
|
|
|
712866 |
Subject: [PATCH] splitup dracut-init.sh from dracut-functions.sh
|
|
|
712866 |
|
|
|
712866 |
other tools want to source dracut-functions.sh without any mkdir side
|
|
|
712866 |
effects.
|
|
|
712866 |
|
|
|
712866 |
(cherry picked from commit 777f2db0373ccbc1a44fc2d960ecefbe50195055)
|
|
|
712866 |
---
|
|
|
712866 |
Makefile | 1 +
|
|
|
712866 |
dracut-functions.sh | 9 ++-------
|
|
|
712866 |
dracut-init.sh | 34 ++++++++++++++++++++++++++++++++++
|
|
|
712866 |
dracut.sh | 8 ++++----
|
|
|
712866 |
dracut.spec | 1 +
|
|
|
712866 |
test/TEST-01-BASIC/test.sh | 6 +++---
|
|
|
712866 |
test/TEST-02-SYSTEMD/test.sh | 6 +++---
|
|
|
712866 |
test/TEST-03-USR-MOUNT/test.sh | 6 +++---
|
|
|
712866 |
test/TEST-04-FULL-SYSTEMD/test.sh | 6 +++---
|
|
|
712866 |
test/TEST-10-RAID/test.sh | 6 +++---
|
|
|
712866 |
test/TEST-11-LVM/test.sh | 6 +++---
|
|
|
712866 |
test/TEST-12-RAID-DEG/test.sh | 6 +++---
|
|
|
712866 |
test/TEST-13-ENC-RAID-LVM/test.sh | 6 +++---
|
|
|
712866 |
test/TEST-14-IMSM/test.sh | 6 +++---
|
|
|
712866 |
test/TEST-15-BTRFSRAID/test.sh | 6 +++---
|
|
|
712866 |
test/TEST-16-DMSQUASH/test.sh | 4 ++--
|
|
|
712866 |
test/TEST-17-LVM-THIN/test.sh | 6 +++---
|
|
|
712866 |
test/TEST-20-NFS/test.sh | 6 +++---
|
|
|
712866 |
test/TEST-30-ISCSI/test.sh | 8 ++++----
|
|
|
712866 |
test/TEST-40-NBD/test.sh | 10 +++++-----
|
|
|
712866 |
test/TEST-50-MULTINIC/test.sh | 6 +++---
|
|
|
712866 |
21 files changed, 92 insertions(+), 61 deletions(-)
|
|
|
712866 |
create mode 100644 dracut-init.sh
|
|
|
712866 |
|
|
|
712866 |
diff --git a/Makefile b/Makefile
|
|
|
5c6c2a |
index 5441d8f4..18f5a88c 100644
|
|
|
712866 |
--- a/Makefile
|
|
|
712866 |
+++ b/Makefile
|
|
|
712866 |
@@ -106,6 +106,7 @@ install: dracut-version.sh
|
|
|
712866 |
install -m 0644 dracut.conf $(DESTDIR)$(sysconfdir)/dracut.conf
|
|
|
712866 |
mkdir -p $(DESTDIR)$(sysconfdir)/dracut.conf.d
|
|
|
712866 |
mkdir -p $(DESTDIR)$(pkglibdir)/dracut.conf.d
|
|
|
712866 |
+ install -m 0755 dracut-init.sh $(DESTDIR)$(pkglibdir)/dracut-init.sh
|
|
|
712866 |
install -m 0755 dracut-functions.sh $(DESTDIR)$(pkglibdir)/dracut-functions.sh
|
|
|
712866 |
install -m 0755 dracut-version.sh $(DESTDIR)$(pkglibdir)/dracut-version.sh
|
|
|
712866 |
ln -fs dracut-functions.sh $(DESTDIR)$(pkglibdir)/dracut-functions
|
|
|
712866 |
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
|
|
5c6c2a |
index 4ea3204d..31586ca4 100755
|
|
|
712866 |
--- a/dracut-functions.sh
|
|
|
712866 |
+++ b/dracut-functions.sh
|
|
|
712866 |
@@ -22,14 +22,9 @@
|
|
|
712866 |
export LC_MESSAGES=C
|
|
|
712866 |
|
|
|
712866 |
if [[ $DRACUT_KERNEL_LAZY ]] && ! [[ $DRACUT_KERNEL_LAZY_HASHDIR ]]; then
|
|
|
712866 |
- if ! [[ -d "$initdir/.kernelmodseen" ]]; then
|
|
|
712866 |
- mkdir -p "$initdir/.kernelmodseen"
|
|
|
712866 |
+ if [[ -d "$initdir/.kernelmodseen" ]]; then
|
|
|
712866 |
+ DRACUT_KERNEL_LAZY_HASHDIR="$initdir/.kernelmodseen"
|
|
|
712866 |
fi
|
|
|
712866 |
- DRACUT_KERNEL_LAZY_HASHDIR="$initdir/.kernelmodseen"
|
|
|
712866 |
-fi
|
|
|
712866 |
-
|
|
|
712866 |
-if [[ $initdir ]] && ! [[ -d $initdir ]]; then
|
|
|
712866 |
- mkdir -p "$initdir"
|
|
|
712866 |
fi
|
|
|
712866 |
|
|
|
712866 |
# Generic substring function. If $2 is in $1, return 0.
|
|
|
712866 |
diff --git a/dracut-init.sh b/dracut-init.sh
|
|
|
712866 |
new file mode 100644
|
|
|
5c6c2a |
index 00000000..469e42ad
|
|
|
712866 |
--- /dev/null
|
|
|
712866 |
+++ b/dracut-init.sh
|
|
|
712866 |
@@ -0,0 +1,34 @@
|
|
|
712866 |
+#!/bin/bash
|
|
|
712866 |
+#
|
|
|
712866 |
+# functions used by dracut and other tools.
|
|
|
712866 |
+#
|
|
|
712866 |
+# Copyright 2005-2009 Red Hat, Inc. All rights reserved.
|
|
|
712866 |
+#
|
|
|
712866 |
+# This program is free software; you can redistribute it and/or modify
|
|
|
712866 |
+# it under the terms of the GNU General Public License as published by
|
|
|
712866 |
+# the Free Software Foundation; either version 2 of the License, or
|
|
|
712866 |
+# (at your option) any later version.
|
|
|
712866 |
+#
|
|
|
712866 |
+# This program is distributed in the hope that it will be useful,
|
|
|
712866 |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
712866 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
712866 |
+# GNU General Public License for more details.
|
|
|
712866 |
+#
|
|
|
712866 |
+# You should have received a copy of the GNU General Public License
|
|
|
712866 |
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
712866 |
+#
|
|
|
712866 |
+export LC_MESSAGES=C
|
|
|
712866 |
+
|
|
|
712866 |
+if [[ $DRACUT_KERNEL_LAZY ]] && ! [[ $DRACUT_KERNEL_LAZY_HASHDIR ]]; then
|
|
|
712866 |
+ if ! [[ -d "$initdir/.kernelmodseen" ]]; then
|
|
|
712866 |
+ mkdir -p "$initdir/.kernelmodseen"
|
|
|
712866 |
+ fi
|
|
|
712866 |
+ DRACUT_KERNEL_LAZY_HASHDIR="$initdir/.kernelmodseen"
|
|
|
712866 |
+fi
|
|
|
712866 |
+
|
|
|
712866 |
+if [[ $initdir ]] && ! [[ -d $initdir ]]; then
|
|
|
712866 |
+ mkdir -p "$initdir"
|
|
|
712866 |
+fi
|
|
|
712866 |
+
|
|
|
712866 |
+[[ $dracutbasedir ]] || export dracutbasedir=${BASH_SOURCE%/*}
|
|
|
712866 |
+. $dracutbasedir/dracut-functions.sh
|
|
|
712866 |
diff --git a/dracut.sh b/dracut.sh
|
|
|
5c6c2a |
index cc22a14d..a214f810 100755
|
|
|
712866 |
--- a/dracut.sh
|
|
|
712866 |
+++ b/dracut.sh
|
|
|
712866 |
@@ -519,7 +519,7 @@ while :; do
|
|
|
712866 |
-q|--quiet) ((verbosity_mod_l--));;
|
|
|
712866 |
-l|--local)
|
|
|
712866 |
allowlocal="yes"
|
|
|
712866 |
- [[ -f "$(readlink -f "${0%/*}")/dracut-functions.sh" ]] \
|
|
|
712866 |
+ [[ -f "$(readlink -f "${0%/*}")/dracut-init.sh" ]] \
|
|
|
712866 |
&& dracutbasedir="$(readlink -f "${0%/*}")"
|
|
|
712866 |
;;
|
|
|
712866 |
-H|--hostonly|--host-only)
|
|
|
712866 |
@@ -841,10 +841,10 @@ if [[ $print_cmdline ]]; then
|
|
|
712866 |
kmsgloglvl=0
|
|
|
712866 |
fi
|
|
|
712866 |
|
|
|
712866 |
-if [[ -f $dracutbasedir/dracut-functions.sh ]]; then
|
|
|
712866 |
- . $dracutbasedir/dracut-functions.sh
|
|
|
712866 |
+if [[ -f $dracutbasedir/dracut-init.sh ]]; then
|
|
|
712866 |
+ . $dracutbasedir/dracut-init.sh
|
|
|
712866 |
else
|
|
|
712866 |
- printf "%s\n" "dracut: Cannot find $dracutbasedir/dracut-functions.sh." >&2
|
|
|
712866 |
+ printf "%s\n" "dracut: Cannot find $dracutbasedir/dracut-init.sh." >&2
|
|
|
712866 |
printf "%s\n" "dracut: Are you running from a git checkout?" >&2
|
|
|
712866 |
printf "%s\n" "dracut: Try passing -l as an argument to $0" >&2
|
|
|
712866 |
exit 1
|
|
|
712866 |
diff --git a/dracut.spec b/dracut.spec
|
|
|
5c6c2a |
index 302cfc5d..d22f5861 100644
|
|
|
712866 |
--- a/dracut.spec
|
|
|
712866 |
+++ b/dracut.spec
|
|
|
712866 |
@@ -296,6 +296,7 @@ rm -rf -- $RPM_BUILD_ROOT
|
|
|
712866 |
%endif
|
|
|
712866 |
%dir %{dracutlibdir}
|
|
|
712866 |
%dir %{dracutlibdir}/modules.d
|
|
|
712866 |
+%{dracutlibdir}/dracut-init.sh
|
|
|
712866 |
%{dracutlibdir}/dracut-functions.sh
|
|
|
712866 |
%{dracutlibdir}/dracut-functions
|
|
|
712866 |
%{dracutlibdir}/dracut-version.sh
|
|
|
712866 |
diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh
|
|
|
5c6c2a |
index 02ebc231..642b250e 100755
|
|
|
712866 |
--- a/test/TEST-01-BASIC/test.sh
|
|
|
712866 |
+++ b/test/TEST-01-BASIC/test.sh
|
|
|
712866 |
@@ -29,7 +29,7 @@ test_setup() {
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay/source
|
|
|
712866 |
mkdir -p $initdir
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
|
|
|
712866 |
mount dmesg ifconfig dhclient mkdir cp ping dhclient \
|
|
|
712866 |
umount strace less setsid
|
|
|
712866 |
@@ -51,7 +51,7 @@ test_setup() {
|
|
|
712866 |
# second, install the files needed to make the root filesystem
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sfdisk mkfs.ext3 poweroff cp umount sync
|
|
|
712866 |
inst_hook initqueue 01 ./create-root.sh
|
|
|
712866 |
inst_hook initqueue/finished 01 ./finished-false.sh
|
|
|
712866 |
@@ -80,7 +80,7 @@ test_setup() {
|
|
|
712866 |
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple poweroff shutdown
|
|
|
712866 |
inst_hook emergency 000 ./hard-off.sh
|
|
|
712866 |
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
|
|
712866 |
diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh
|
|
|
5c6c2a |
index 2a8ed6b5..4ebff837 100755
|
|
|
712866 |
--- a/test/TEST-02-SYSTEMD/test.sh
|
|
|
712866 |
+++ b/test/TEST-02-SYSTEMD/test.sh
|
|
|
712866 |
@@ -25,7 +25,7 @@ test_setup() {
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay/source
|
|
|
712866 |
mkdir -p $initdir
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
|
|
|
712866 |
mount dmesg ifconfig dhclient mkdir cp ping dhclient \
|
|
|
712866 |
umount strace less setsid
|
|
|
712866 |
@@ -47,7 +47,7 @@ test_setup() {
|
|
|
712866 |
# second, install the files needed to make the root filesystem
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sfdisk mkfs.ext3 poweroff cp umount
|
|
|
712866 |
inst_hook initqueue 01 ./create-root.sh
|
|
|
712866 |
inst_hook initqueue/finished 01 ./finished-false.sh
|
|
|
712866 |
@@ -76,7 +76,7 @@ test_setup() {
|
|
|
712866 |
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple poweroff shutdown
|
|
|
712866 |
inst_hook emergency 000 ./hard-off.sh
|
|
|
712866 |
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
|
|
712866 |
diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh
|
|
|
5c6c2a |
index b8231fed..e772352a 100755
|
|
|
712866 |
--- a/test/TEST-03-USR-MOUNT/test.sh
|
|
|
712866 |
+++ b/test/TEST-03-USR-MOUNT/test.sh
|
|
|
712866 |
@@ -55,7 +55,7 @@ test_setup() {
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay/source
|
|
|
712866 |
mkdir -p $initdir
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
|
|
|
712866 |
mount dmesg ifconfig dhclient mkdir cp ping dhclient \
|
|
|
712866 |
umount strace less setsid
|
|
|
712866 |
@@ -78,7 +78,7 @@ test_setup() {
|
|
|
712866 |
# second, install the files needed to make the root filesystem
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sfdisk mkfs.btrfs btrfs poweroff cp umount sync
|
|
|
712866 |
inst_hook initqueue 01 ./create-root.sh
|
|
|
712866 |
inst_hook initqueue/finished 01 ./finished-false.sh
|
|
|
712866 |
@@ -114,7 +114,7 @@ test_setup() {
|
|
|
712866 |
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple poweroff shutdown
|
|
|
712866 |
inst_hook emergency 000 ./hard-off.sh
|
|
|
712866 |
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
|
|
712866 |
diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh
|
|
|
5c6c2a |
index aa83122c..38342386 100755
|
|
|
712866 |
--- a/test/TEST-04-FULL-SYSTEMD/test.sh
|
|
|
712866 |
+++ b/test/TEST-04-FULL-SYSTEMD/test.sh
|
|
|
712866 |
@@ -57,7 +57,7 @@ test_setup() {
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay/source
|
|
|
712866 |
mkdir -p $initdir
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
|
|
|
712866 |
for d in usr/bin usr/sbin bin etc lib "$libdir" sbin tmp usr var var/log dev proc sys sysroot root run; do
|
|
|
712866 |
if [ -L "/$d" ]; then
|
|
|
712866 |
@@ -221,7 +221,7 @@ EOF
|
|
|
712866 |
# second, install the files needed to make the root filesystem
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sfdisk mkfs.btrfs btrfs poweroff cp umount sync
|
|
|
712866 |
inst_hook initqueue 01 ./create-root.sh
|
|
|
712866 |
inst_hook initqueue/finished 01 ./finished-false.sh
|
|
|
712866 |
@@ -256,7 +256,7 @@ EOF
|
|
|
712866 |
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple poweroff shutdown
|
|
|
712866 |
inst_hook emergency 000 ./hard-off.sh
|
|
|
712866 |
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
|
|
712866 |
diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh
|
|
|
5c6c2a |
index d79d5cd4..cf474dff 100755
|
|
|
712866 |
--- a/test/TEST-10-RAID/test.sh
|
|
|
712866 |
+++ b/test/TEST-10-RAID/test.sh
|
|
|
712866 |
@@ -28,7 +28,7 @@ test_setup() {
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay/source
|
|
|
712866 |
(mkdir -p "$initdir"; cd "$initdir"; mkdir -p dev sys proc etc var/run tmp run)
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
|
|
|
712866 |
mount dmesg ifconfig dhclient mkdir cp ping dhclient
|
|
|
712866 |
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
|
|
712866 |
@@ -49,7 +49,7 @@ test_setup() {
|
|
|
712866 |
# second, install the files needed to make the root filesystem
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sfdisk mke2fs poweroff cp umount
|
|
|
712866 |
inst_hook initqueue 01 ./create-root.sh
|
|
|
712866 |
inst_hook initqueue/finished 01 ./finished-false.sh
|
|
|
712866 |
@@ -77,7 +77,7 @@ test_setup() {
|
|
|
712866 |
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple poweroff shutdown
|
|
|
712866 |
inst_hook emergency 000 ./hard-off.sh
|
|
|
712866 |
inst ./cryptroot-ask.sh /sbin/cryptroot-ask
|
|
|
712866 |
diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh
|
|
|
5c6c2a |
index 732d0c8f..c3c27bce 100755
|
|
|
712866 |
--- a/test/TEST-11-LVM/test.sh
|
|
|
712866 |
+++ b/test/TEST-11-LVM/test.sh
|
|
|
712866 |
@@ -24,7 +24,7 @@ test_setup() {
|
|
|
712866 |
# Create what will eventually be our root filesystem onto an overlay
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay/source
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
|
|
|
712866 |
mount dmesg ifconfig dhclient mkdir cp ping dhclient
|
|
|
712866 |
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
|
|
712866 |
@@ -46,7 +46,7 @@ test_setup() {
|
|
|
712866 |
# second, install the files needed to make the root filesystem
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sfdisk mke2fs poweroff cp umount
|
|
|
712866 |
inst_hook initqueue 01 ./create-root.sh
|
|
|
712866 |
inst_hook initqueue/finished 01 ./finished-false.sh
|
|
|
712866 |
@@ -69,7 +69,7 @@ test_setup() {
|
|
|
712866 |
grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple poweroff shutdown
|
|
|
712866 |
inst_hook emergency 000 ./hard-off.sh
|
|
|
712866 |
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
|
|
712866 |
diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh
|
|
|
5c6c2a |
index 87fe542f..11f66b23 100755
|
|
|
712866 |
--- a/test/TEST-12-RAID-DEG/test.sh
|
|
|
712866 |
+++ b/test/TEST-12-RAID-DEG/test.sh
|
|
|
712866 |
@@ -66,7 +66,7 @@ test_setup() {
|
|
|
712866 |
# Create what will eventually be our root filesystem onto an overlay
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay/source
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
|
|
|
712866 |
mount dmesg ifconfig dhclient mkdir cp ping dhclient
|
|
|
712866 |
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
|
|
712866 |
@@ -87,7 +87,7 @@ test_setup() {
|
|
|
712866 |
# second, install the files needed to make the root filesystem
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sfdisk mke2fs poweroff cp umount dd grep
|
|
|
712866 |
inst_hook initqueue 01 ./create-root.sh
|
|
|
712866 |
inst_hook initqueue/finished 01 ./finished-false.sh
|
|
|
712866 |
@@ -120,7 +120,7 @@ test_setup() {
|
|
|
712866 |
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple poweroff shutdown
|
|
|
712866 |
inst_hook emergency 000 ./hard-off.sh
|
|
|
712866 |
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
|
|
712866 |
diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh
|
|
|
5c6c2a |
index 129620b1..993f71db 100755
|
|
|
712866 |
--- a/test/TEST-13-ENC-RAID-LVM/test.sh
|
|
|
712866 |
+++ b/test/TEST-13-ENC-RAID-LVM/test.sh
|
|
|
712866 |
@@ -62,7 +62,7 @@ test_setup() {
|
|
|
712866 |
# Create what will eventually be our root filesystem onto an overlay
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay/source
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
|
|
|
712866 |
mount dmesg ifconfig dhclient mkdir cp ping dhclient
|
|
|
712866 |
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
|
|
712866 |
@@ -83,7 +83,7 @@ test_setup() {
|
|
|
712866 |
# second, install the files needed to make the root filesystem
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sfdisk mke2fs poweroff cp umount grep
|
|
|
712866 |
inst_hook initqueue 01 ./create-root.sh
|
|
|
712866 |
inst_hook initqueue/finished 01 ./finished-false.sh
|
|
|
712866 |
@@ -113,7 +113,7 @@ test_setup() {
|
|
|
712866 |
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple poweroff shutdown
|
|
|
712866 |
inst_hook emergency 000 ./hard-off.sh
|
|
|
712866 |
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
|
|
712866 |
diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh
|
|
|
5c6c2a |
index ad0cf7b0..9465965c 100755
|
|
|
712866 |
--- a/test/TEST-14-IMSM/test.sh
|
|
|
712866 |
+++ b/test/TEST-14-IMSM/test.sh
|
|
|
712866 |
@@ -54,7 +54,7 @@ test_setup() {
|
|
|
712866 |
# Create what will eventually be our root filesystem onto an overlay
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay/source
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
|
|
|
712866 |
mount dmesg ifconfig dhclient mkdir cp ping dhclient
|
|
|
712866 |
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
|
|
712866 |
@@ -76,7 +76,7 @@ test_setup() {
|
|
|
712866 |
# second, install the files needed to make the root filesystem
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sfdisk mke2fs poweroff cp umount grep
|
|
|
712866 |
inst_hook initqueue 01 ./create-root.sh
|
|
|
712866 |
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
|
|
712866 |
@@ -104,7 +104,7 @@ test_setup() {
|
|
|
712866 |
echo $MD_UUID > $TESTDIR/mduuid
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple poweroff shutdown
|
|
|
712866 |
inst_hook emergency 000 ./hard-off.sh
|
|
|
712866 |
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
|
|
712866 |
diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh
|
|
|
5c6c2a |
index 71f5703a..9b971362 100755
|
|
|
712866 |
--- a/test/TEST-15-BTRFSRAID/test.sh
|
|
|
712866 |
+++ b/test/TEST-15-BTRFSRAID/test.sh
|
|
|
712866 |
@@ -26,7 +26,7 @@ test_setup() {
|
|
|
712866 |
# Create what will eventually be our root filesystem onto an overlay
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay/source
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
|
|
|
712866 |
mount dmesg ifconfig dhclient mkdir cp ping dhclient
|
|
|
712866 |
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
|
|
712866 |
@@ -47,7 +47,7 @@ test_setup() {
|
|
|
712866 |
# second, install the files needed to make the root filesystem
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sfdisk mkfs.btrfs poweroff cp umount
|
|
|
712866 |
inst_hook initqueue 01 ./create-root.sh
|
|
|
712866 |
inst_hook initqueue/finished 01 ./finished-false.sh
|
|
|
712866 |
@@ -77,7 +77,7 @@ test_setup() {
|
|
|
712866 |
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple poweroff shutdown
|
|
|
712866 |
inst_hook emergency 000 ./hard-off.sh
|
|
|
712866 |
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
|
|
712866 |
diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh
|
|
|
5c6c2a |
index 252e8454..c08a2a41 100755
|
|
|
712866 |
--- a/test/TEST-16-DMSQUASH/test.sh
|
|
|
712866 |
+++ b/test/TEST-16-DMSQUASH/test.sh
|
|
|
712866 |
@@ -30,7 +30,7 @@ test_setup() {
|
|
|
712866 |
mkdir -p -- "$TESTDIR"/overlay
|
|
|
712866 |
(
|
|
|
712866 |
export initdir="$TESTDIR"/overlay
|
|
|
712866 |
- . "$basedir"/dracut-functions.sh
|
|
|
712866 |
+ . "$basedir"/dracut-init.sh
|
|
|
712866 |
inst_multiple poweroff shutdown
|
|
|
712866 |
inst_hook emergency 000 ./hard-off.sh
|
|
|
712866 |
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
|
|
712866 |
@@ -48,7 +48,7 @@ test_setup() {
|
|
|
712866 |
# Create what will eventually be our root filesystem onto an overlay
|
|
|
712866 |
(
|
|
|
712866 |
export initdir="$TESTDIR"/root-source
|
|
|
712866 |
- . "$basedir"/dracut-functions.sh
|
|
|
712866 |
+ . "$basedir"/dracut-init.sh
|
|
|
712866 |
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
|
|
|
712866 |
mount dmesg ifconfig dhclient mkdir cp ping dhclient \
|
|
|
712866 |
umount strace less
|
|
|
712866 |
diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh
|
|
|
5c6c2a |
index 4c904b0a..79e224e2 100755
|
|
|
712866 |
--- a/test/TEST-17-LVM-THIN/test.sh
|
|
|
712866 |
+++ b/test/TEST-17-LVM-THIN/test.sh
|
|
|
712866 |
@@ -24,7 +24,7 @@ test_setup() {
|
|
|
712866 |
# Create what will eventually be our root filesystem onto an overlay
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay/source
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
|
|
|
712866 |
mount dmesg ifconfig dhclient mkdir cp ping dhclient
|
|
|
712866 |
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
|
|
712866 |
@@ -46,7 +46,7 @@ test_setup() {
|
|
|
712866 |
# second, install the files needed to make the root filesystem
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sfdisk mke2fs poweroff cp umount
|
|
|
712866 |
inst_hook initqueue 01 ./create-root.sh
|
|
|
712866 |
inst_hook initqueue/finished 01 ./finished-false.sh
|
|
|
712866 |
@@ -69,7 +69,7 @@ test_setup() {
|
|
|
712866 |
grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple poweroff shutdown
|
|
|
712866 |
inst_hook emergency 000 ./hard-off.sh
|
|
|
712866 |
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
|
|
712866 |
diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh
|
|
|
5c6c2a |
index 7b5e3c5d..14350e98 100755
|
|
|
712866 |
--- a/test/TEST-20-NFS/test.sh
|
|
|
712866 |
+++ b/test/TEST-20-NFS/test.sh
|
|
|
712866 |
@@ -221,7 +221,7 @@ test_setup() {
|
|
|
712866 |
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/mnt
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
|
|
|
712866 |
for _f in modules.builtin.bin modules.builtin; do
|
|
|
712866 |
[[ $srcmods/$_f ]] && break
|
|
|
712866 |
@@ -287,7 +287,7 @@ test_setup() {
|
|
|
712866 |
# Make client root inside server root
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/mnt/nfs/client
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
|
|
|
712866 |
inst_multiple sh shutdown poweroff stty cat ps ln ip \
|
|
|
712866 |
mount dmesg mkdir cp ping grep
|
|
|
712866 |
@@ -331,7 +331,7 @@ test_setup() {
|
|
|
712866 |
# Make an overlay with needed tools for the test harness
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
mkdir $TESTDIR/overlay
|
|
|
712866 |
inst_multiple poweroff shutdown
|
|
|
712866 |
inst_hook emergency 000 ./hard-off.sh
|
|
|
712866 |
diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh
|
|
|
5c6c2a |
index f5977839..a258c042 100755
|
|
|
712866 |
--- a/test/TEST-30-ISCSI/test.sh
|
|
|
712866 |
+++ b/test/TEST-30-ISCSI/test.sh
|
|
|
712866 |
@@ -104,7 +104,7 @@ test_setup() {
|
|
|
712866 |
# Create what will eventually be our root filesystem onto an overlay
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay/source
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sh shutdown poweroff stty cat ps ln ip \
|
|
|
712866 |
mount dmesg mkdir cp ping grep
|
|
|
712866 |
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
|
|
712866 |
@@ -121,7 +121,7 @@ test_setup() {
|
|
|
712866 |
# second, install the files needed to make the root filesystem
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple sfdisk mkfs.ext3 poweroff cp umount
|
|
|
712866 |
inst_hook initqueue 01 ./create-root.sh
|
|
|
712866 |
inst_hook initqueue/finished 01 ./finished-false.sh
|
|
|
712866 |
@@ -157,7 +157,7 @@ test_setup() {
|
|
|
712866 |
rm -- $TESTDIR/client.img
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple poweroff shutdown
|
|
|
712866 |
inst_hook emergency 000 ./hard-off.sh
|
|
|
712866 |
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
|
|
712866 |
@@ -177,7 +177,7 @@ test_setup() {
|
|
|
712866 |
kernel=$KVERSION
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/mnt
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
(
|
|
|
712866 |
cd "$initdir";
|
|
|
712866 |
mkdir -p dev sys proc etc var/run tmp var/lib/dhcpd /etc/iscsi
|
|
|
712866 |
diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh
|
|
|
5c6c2a |
index 59494ed8..abf1a4f4 100755
|
|
|
712866 |
--- a/test/TEST-40-NBD/test.sh
|
|
|
712866 |
+++ b/test/TEST-40-NBD/test.sh
|
|
|
712866 |
@@ -195,7 +195,7 @@ make_encrypted_root() {
|
|
|
712866 |
# Create what will eventually be our root filesystem onto an overlay
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay/source
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
mkdir -p "$initdir"
|
|
|
712866 |
(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
|
|
|
712866 |
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip \
|
|
|
712866 |
@@ -214,7 +214,7 @@ make_encrypted_root() {
|
|
|
712866 |
# second, install the files needed to make the root filesystem
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple mke2fs poweroff cp umount tune2fs
|
|
|
712866 |
inst_hook emergency 000 ./hard-off.sh
|
|
|
712866 |
inst_hook initqueue 01 ./create-root.sh
|
|
|
712866 |
@@ -253,7 +253,7 @@ make_client_root() {
|
|
|
712866 |
kernel=$KVERSION
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/mnt
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
mkdir -p "$initdir"
|
|
|
712866 |
(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
|
|
|
712866 |
inst_multiple sh ls shutdown poweroff stty cat ps ln ip \
|
|
|
712866 |
@@ -288,7 +288,7 @@ make_server_root() {
|
|
|
712866 |
kernel=$KVERSION
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/mnt
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
mkdir -p "$initdir"
|
|
|
712866 |
(
|
|
|
712866 |
cd "$initdir";
|
|
|
712866 |
@@ -335,7 +335,7 @@ test_setup() {
|
|
|
712866 |
# Make the test image
|
|
|
712866 |
(
|
|
|
712866 |
export initdir=$TESTDIR/overlay
|
|
|
712866 |
- . $basedir/dracut-functions.sh
|
|
|
712866 |
+ . $basedir/dracut-init.sh
|
|
|
712866 |
inst_multiple poweroff shutdown
|
|
|
712866 |
inst_hook emergency 000 ./hard-off.sh
|
|
|
712866 |
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
|
|
712866 |
diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh
|
|
|
5c6c2a |
index 3c6003b4..4f73203f 100755
|
|
|
712866 |
--- a/test/TEST-50-MULTINIC/test.sh
|
|
|
712866 |
+++ b/test/TEST-50-MULTINIC/test.sh
|
|
|
712866 |
@@ -150,7 +150,7 @@ test_setup() {
|
|
|
712866 |
|
|
|
712866 |
(
|
|
|
712866 |
export initdir="$TESTDIR"/mnt
|
|
|
712866 |
- . "$basedir"/dracut-functions.sh
|
|
|
712866 |
+ . "$basedir"/dracut-init.sh
|
|
|
712866 |
|
|
|
712866 |
(
|
|
|
712866 |
cd "$initdir";
|
|
|
712866 |
@@ -216,7 +216,7 @@ test_setup() {
|
|
|
712866 |
# Make client root inside server root
|
|
|
712866 |
(
|
|
|
712866 |
export initdir="$TESTDIR"/mnt/nfs/client
|
|
|
712866 |
- . "$basedir"/dracut-functions.sh
|
|
|
712866 |
+ . "$basedir"/dracut-init.sh
|
|
|
712866 |
inst_multiple sh shutdown poweroff stty cat ps ln ip \
|
|
|
712866 |
mount dmesg mkdir cp ping grep ls
|
|
|
712866 |
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
|
|
712866 |
@@ -256,7 +256,7 @@ test_setup() {
|
|
|
712866 |
# Make an overlay with needed tools for the test harness
|
|
|
712866 |
(
|
|
|
712866 |
export initdir="$TESTDIR"/overlay
|
|
|
712866 |
- . "$basedir"/dracut-functions.sh
|
|
|
712866 |
+ . "$basedir"/dracut-init.sh
|
|
|
712866 |
inst_multiple poweroff shutdown
|
|
|
712866 |
inst_hook emergency 000 ./hard-off.sh
|
|
|
712866 |
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|