splitup dracut-init.sh from dracut-functions.sh
other tools want to source dracut-functions.sh without any mkdir side effects.master
parent
ba665de454
commit
777f2db037
1
Makefile
1
Makefile
|
@ -118,6 +118,7 @@ install: all
|
|||
install -m 0644 dracut.conf $(DESTDIR)$(sysconfdir)/dracut.conf
|
||||
mkdir -p $(DESTDIR)$(sysconfdir)/dracut.conf.d
|
||||
mkdir -p $(DESTDIR)$(pkglibdir)/dracut.conf.d
|
||||
install -m 0755 dracut-init.sh $(DESTDIR)$(pkglibdir)/dracut-init.sh
|
||||
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
|
||||
|
|
|
@ -20,14 +20,9 @@
|
|||
export LC_MESSAGES=C
|
||||
|
||||
if [[ $DRACUT_KERNEL_LAZY ]] && ! [[ $DRACUT_KERNEL_LAZY_HASHDIR ]]; then
|
||||
if ! [[ -d "$initdir/.kernelmodseen" ]]; then
|
||||
mkdir -p "$initdir/.kernelmodseen"
|
||||
if [[ -d "$initdir/.kernelmodseen" ]]; then
|
||||
DRACUT_KERNEL_LAZY_HASHDIR="$initdir/.kernelmodseen"
|
||||
fi
|
||||
DRACUT_KERNEL_LAZY_HASHDIR="$initdir/.kernelmodseen"
|
||||
fi
|
||||
|
||||
if [[ $initdir ]] && ! [[ -d $initdir ]]; then
|
||||
mkdir -p "$initdir"
|
||||
fi
|
||||
|
||||
# Generic substring function. If $2 is in $1, return 0.
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# functions used by dracut and other tools.
|
||||
#
|
||||
# Copyright 2005-2009 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
export LC_MESSAGES=C
|
||||
|
||||
if [[ $DRACUT_KERNEL_LAZY ]] && ! [[ $DRACUT_KERNEL_LAZY_HASHDIR ]]; then
|
||||
if ! [[ -d "$initdir/.kernelmodseen" ]]; then
|
||||
mkdir -p "$initdir/.kernelmodseen"
|
||||
fi
|
||||
DRACUT_KERNEL_LAZY_HASHDIR="$initdir/.kernelmodseen"
|
||||
fi
|
||||
|
||||
if [[ $initdir ]] && ! [[ -d $initdir ]]; then
|
||||
mkdir -p "$initdir"
|
||||
fi
|
||||
|
||||
[[ $dracutbasedir ]] || export dracutbasedir=${BASH_SOURCE%/*}
|
||||
. $dracutbasedir/dracut-functions.sh
|
|
@ -551,7 +551,7 @@ while :; do
|
|||
-q|--quiet) ((verbosity_mod_l--));;
|
||||
-l|--local)
|
||||
allowlocal="yes"
|
||||
[[ -f "$(readlink -f "${0%/*}")/dracut-functions.sh" ]] \
|
||||
[[ -f "$(readlink -f "${0%/*}")/dracut-init.sh" ]] \
|
||||
&& dracutbasedir="$(readlink -f "${0%/*}")"
|
||||
;;
|
||||
-H|--hostonly|--host-only)
|
||||
|
@ -917,10 +917,10 @@ if [[ -f $dracutbasedir/dracut-version.sh ]]; then
|
|||
. $dracutbasedir/dracut-version.sh
|
||||
fi
|
||||
|
||||
if [[ -f $dracutbasedir/dracut-functions.sh ]]; then
|
||||
. $dracutbasedir/dracut-functions.sh
|
||||
if [[ -f $dracutbasedir/dracut-init.sh ]]; then
|
||||
. $dracutbasedir/dracut-init.sh
|
||||
else
|
||||
printf "%s\n" "dracut: Cannot find $dracutbasedir/dracut-functions.sh." >&2
|
||||
printf "%s\n" "dracut: Cannot find $dracutbasedir/dracut-init.sh." >&2
|
||||
printf "%s\n" "dracut: Are you running from a git checkout?" >&2
|
||||
printf "%s\n" "dracut: Try passing -l as an argument to $0" >&2
|
||||
exit 1
|
||||
|
|
|
@ -29,7 +29,7 @@ test_setup() {
|
|||
(
|
||||
export initdir=$TESTDIR/overlay/source
|
||||
mkdir -p $initdir
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
(
|
||||
cd "$initdir"
|
||||
mkdir -p -- dev sys proc etc var/run tmp
|
||||
|
@ -58,7 +58,7 @@ test_setup() {
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple sfdisk mkfs.ext3 poweroff cp umount sync
|
||||
inst_hook initqueue 01 ./create-root.sh
|
||||
inst_hook initqueue/finished 01 ./finished-false.sh
|
||||
|
@ -87,7 +87,7 @@ test_setup() {
|
|||
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
|
|
@ -25,7 +25,7 @@ test_setup() {
|
|||
(
|
||||
export initdir=$TESTDIR/overlay/source
|
||||
mkdir -p $initdir
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
(
|
||||
cd "$initdir"
|
||||
mkdir -p -- dev sys proc etc var/run tmp
|
||||
|
@ -55,7 +55,7 @@ test_setup() {
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple sfdisk mkfs.ext3 poweroff cp umount
|
||||
inst_hook initqueue 01 ./create-root.sh
|
||||
inst_hook initqueue/finished 01 ./finished-false.sh
|
||||
|
@ -84,7 +84,7 @@ test_setup() {
|
|||
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
|
|
@ -56,7 +56,7 @@ test_setup() {
|
|||
(
|
||||
export initdir=$TESTDIR/overlay/source
|
||||
mkdir -p $initdir
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
(
|
||||
cd "$initdir"
|
||||
mkdir -p -- dev sys proc etc var/run tmp
|
||||
|
@ -86,7 +86,7 @@ test_setup() {
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple sfdisk mkfs.btrfs btrfs poweroff cp umount sync
|
||||
inst_hook initqueue 01 ./create-root.sh
|
||||
inst_hook initqueue/finished 01 ./finished-false.sh
|
||||
|
@ -122,7 +122,7 @@ test_setup() {
|
|||
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
|
|
@ -57,7 +57,7 @@ test_setup() {
|
|||
(
|
||||
export initdir=$TESTDIR/overlay/source
|
||||
mkdir -p $initdir
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
|
||||
for d in usr/bin usr/sbin bin etc lib "$libdir" sbin tmp usr var var/log dev proc sys sysroot root run; do
|
||||
if [ -L "/$d" ]; then
|
||||
|
@ -222,7 +222,7 @@ EOF
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple sfdisk mkfs.btrfs btrfs poweroff cp umount sync
|
||||
inst_hook initqueue 01 ./create-root.sh
|
||||
inst_hook initqueue/finished 01 ./finished-false.sh
|
||||
|
@ -254,7 +254,7 @@ EOF
|
|||
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
|
|
@ -27,7 +27,7 @@ test_setup() {
|
|||
# Create what will eventually be our root filesystem onto an overlay
|
||||
(
|
||||
export initdir=$TESTDIR/overlay/source
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
(
|
||||
cd "$initdir"
|
||||
mkdir -p -- dev sys proc etc var/run tmp
|
||||
|
@ -56,7 +56,7 @@ test_setup() {
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple sfdisk mke2fs poweroff cp umount
|
||||
inst_hook initqueue 01 ./create-root.sh
|
||||
inst_hook initqueue/finished 01 ./finished-false.sh
|
||||
|
@ -84,7 +84,7 @@ test_setup() {
|
|||
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst ./cryptroot-ask.sh /sbin/cryptroot-ask
|
||||
|
|
|
@ -24,7 +24,7 @@ test_setup() {
|
|||
# Create what will eventually be our root filesystem onto an overlay
|
||||
(
|
||||
export initdir=$TESTDIR/overlay/source
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
(
|
||||
cd "$initdir"
|
||||
mkdir -p -- dev sys proc etc var/run tmp
|
||||
|
@ -54,7 +54,7 @@ test_setup() {
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple sfdisk mke2fs poweroff cp umount
|
||||
inst_hook initqueue 01 ./create-root.sh
|
||||
inst_hook initqueue/finished 01 ./finished-false.sh
|
||||
|
@ -77,7 +77,7 @@ test_setup() {
|
|||
grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
|
|
@ -66,7 +66,7 @@ test_setup() {
|
|||
# Create what will eventually be our root filesystem onto an overlay
|
||||
(
|
||||
export initdir=$TESTDIR/overlay/source
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
(
|
||||
cd "$initdir"
|
||||
mkdir -p -- dev sys proc etc var/run tmp
|
||||
|
@ -94,7 +94,7 @@ test_setup() {
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple sfdisk mke2fs poweroff cp umount dd grep
|
||||
inst_hook initqueue 01 ./create-root.sh
|
||||
inst_hook initqueue/finished 01 ./finished-false.sh
|
||||
|
@ -127,7 +127,7 @@ test_setup() {
|
|||
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
|
|
@ -62,7 +62,7 @@ test_setup() {
|
|||
# Create what will eventually be our root filesystem onto an overlay
|
||||
(
|
||||
export initdir=$TESTDIR/overlay/source
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
(
|
||||
cd "$initdir"
|
||||
mkdir -p -- dev sys proc etc var/run tmp
|
||||
|
@ -91,7 +91,7 @@ test_setup() {
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple sfdisk mke2fs poweroff cp umount grep
|
||||
inst_hook initqueue 01 ./create-root.sh
|
||||
inst_hook initqueue/finished 01 ./finished-false.sh
|
||||
|
@ -121,7 +121,7 @@ test_setup() {
|
|||
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
|
|
@ -54,7 +54,7 @@ test_setup() {
|
|||
# Create what will eventually be our root filesystem onto an overlay
|
||||
(
|
||||
export initdir=$TESTDIR/overlay/source
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
(
|
||||
cd "$initdir"
|
||||
mkdir -p -- dev sys proc etc var/run tmp
|
||||
|
@ -83,7 +83,7 @@ test_setup() {
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple 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
|
||||
|
@ -111,7 +111,7 @@ test_setup() {
|
|||
echo $MD_UUID > $TESTDIR/mduuid
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
|
|
@ -26,7 +26,7 @@ test_setup() {
|
|||
# Create what will eventually be our root filesystem onto an overlay
|
||||
(
|
||||
export initdir=$TESTDIR/overlay/source
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
(
|
||||
cd "$initdir"
|
||||
mkdir -p -- dev sys proc etc var/run tmp
|
||||
|
@ -55,7 +55,7 @@ test_setup() {
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple sfdisk mkfs.btrfs poweroff cp umount
|
||||
inst_hook initqueue 01 ./create-root.sh
|
||||
inst_hook initqueue/finished 01 ./finished-false.sh
|
||||
|
@ -85,7 +85,7 @@ test_setup() {
|
|||
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple 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() {
|
|||
mkdir -p -- "$TESTDIR"/overlay
|
||||
(
|
||||
export initdir="$TESTDIR"/overlay
|
||||
. "$basedir"/dracut-functions.sh
|
||||
. "$basedir"/dracut-init.sh
|
||||
inst_multiple poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
@ -49,7 +49,7 @@ test_setup() {
|
|||
# Create what will eventually be our root filesystem onto an overlay
|
||||
(
|
||||
export initdir="$TESTDIR"/root-source
|
||||
. "$basedir"/dracut-functions.sh
|
||||
. "$basedir"/dracut-init.sh
|
||||
(
|
||||
cd "$initdir"
|
||||
mkdir -p -- dev sys proc etc var/run tmp
|
||||
|
|
|
@ -24,7 +24,7 @@ test_setup() {
|
|||
# Create what will eventually be our root filesystem onto an overlay
|
||||
(
|
||||
export initdir=$TESTDIR/overlay/source
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
(
|
||||
cd "$initdir"
|
||||
mkdir -p -- dev sys proc etc var/run tmp
|
||||
|
@ -54,7 +54,7 @@ test_setup() {
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple sfdisk mke2fs poweroff cp umount
|
||||
inst_hook initqueue 01 ./create-root.sh
|
||||
inst_hook initqueue/finished 01 ./finished-false.sh
|
||||
|
@ -77,7 +77,7 @@ test_setup() {
|
|||
grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
|
|
@ -217,7 +217,7 @@ test_setup() {
|
|||
|
||||
(
|
||||
export initdir=$TESTDIR/mnt
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
|
||||
for _f in modules.builtin.bin modules.builtin; do
|
||||
[[ $srcmods/$_f ]] && break
|
||||
|
@ -283,7 +283,7 @@ test_setup() {
|
|||
# Make client root inside server root
|
||||
(
|
||||
export initdir=$TESTDIR/mnt/nfs/client
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
|
||||
inst_multiple sh shutdown poweroff stty cat ps ln ip \
|
||||
mount dmesg mkdir cp ping grep setsid ls vi /etc/virc less cat
|
||||
|
@ -331,7 +331,7 @@ test_setup() {
|
|||
# Make an overlay with needed tools for the test harness
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
mkdir $TESTDIR/overlay
|
||||
inst_multiple poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
|
|
|
@ -103,7 +103,7 @@ test_setup() {
|
|||
# Create what will eventually be our root filesystem onto an overlay
|
||||
(
|
||||
export initdir=$TESTDIR/overlay/source
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
(
|
||||
cd "$initdir"
|
||||
mkdir -p -- dev sys proc etc var/run tmp
|
||||
|
@ -128,7 +128,7 @@ test_setup() {
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple sfdisk mkfs.ext3 poweroff cp umount setsid
|
||||
inst_hook initqueue 01 ./create-root.sh
|
||||
inst_hook initqueue/finished 01 ./finished-false.sh
|
||||
|
@ -164,7 +164,7 @@ test_setup() {
|
|||
rm -- $TESTDIR/client.img
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
@ -185,7 +185,7 @@ test_setup() {
|
|||
kernel=$KVERSION
|
||||
(
|
||||
export initdir=$TESTDIR/mnt
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
(
|
||||
cd "$initdir";
|
||||
mkdir -p dev sys proc etc var/run tmp var/lib/dhcpd /etc/iscsi
|
||||
|
|
|
@ -192,7 +192,7 @@ make_encrypted_root() {
|
|||
# Create what will eventually be our root filesystem onto an overlay
|
||||
(
|
||||
export initdir=$TESTDIR/overlay/source
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
mkdir -p "$initdir"
|
||||
(
|
||||
cd "$initdir"; mkdir -p dev sys proc etc var/run tmp
|
||||
|
@ -217,7 +217,7 @@ make_encrypted_root() {
|
|||
# second, install the files needed to make the root filesystem
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
(
|
||||
cd "$initdir"; mkdir -p dev sys proc etc var/run tmp
|
||||
mkdir -p root usr/bin usr/lib usr/lib64 usr/sbin
|
||||
|
@ -263,7 +263,7 @@ make_client_root() {
|
|||
kernel=$KVERSION
|
||||
(
|
||||
export initdir=$TESTDIR/mnt
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
mkdir -p "$initdir"
|
||||
(
|
||||
cd "$initdir"; mkdir -p dev sys proc etc var/run tmp
|
||||
|
@ -304,7 +304,7 @@ make_server_root() {
|
|||
kernel=$KVERSION
|
||||
(
|
||||
export initdir=$TESTDIR/mnt
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
mkdir -p "$initdir"
|
||||
(
|
||||
cd "$initdir";
|
||||
|
@ -351,7 +351,7 @@ test_setup() {
|
|||
# Make the test image
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-functions.sh
|
||||
. $basedir/dracut-init.sh
|
||||
inst_multiple poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
|
|
@ -146,7 +146,7 @@ test_setup() {
|
|||
|
||||
(
|
||||
export initdir="$TESTDIR"/mnt
|
||||
. "$basedir"/dracut-functions.sh
|
||||
. "$basedir"/dracut-init.sh
|
||||
|
||||
(
|
||||
cd "$initdir";
|
||||
|
@ -212,7 +212,7 @@ test_setup() {
|
|||
# Make client root inside server root
|
||||
(
|
||||
export initdir="$TESTDIR"/mnt/nfs/client
|
||||
. "$basedir"/dracut-functions.sh
|
||||
. "$basedir"/dracut-init.sh
|
||||
(
|
||||
cd "$initdir"
|
||||
mkdir -p dev sys proc etc run
|
||||
|
@ -256,7 +256,7 @@ test_setup() {
|
|||
# Make an overlay with needed tools for the test harness
|
||||
(
|
||||
export initdir="$TESTDIR"/overlay
|
||||
. "$basedir"/dracut-functions.sh
|
||||
. "$basedir"/dracut-init.sh
|
||||
inst_multiple poweroff shutdown
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
|
Loading…
Reference in New Issue