summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2012-06-27 09:32:22 +0200
committerHarald Hoyer <harald@redhat.com>2012-06-29 12:41:27 +0200
commit53fe81e752c59bf526237ea2a1a3e7879d479c9b (patch)
treec0ac7959467b32c0e66bc13cb14060a2680962ca
parente716c0f121d876b381f9cd9841267959732f975d (diff)
downloaddracut-53fe81e752c59bf526237ea2a1a3e7879d479c9b.tar.gz
dracut-53fe81e752c59bf526237ea2a1a3e7879d479c9b.tar.bz2
dracut-53fe81e752c59bf526237ea2a1a3e7879d479c9b.zip
modules.d/*/module-setup.sh: combine and specify type for installs
To speedup image creation, combine dracut_install calls and specify the exact type. E.g. inst_script instead of the generic inst.
-rwxr-xr-xmodules.d/00bootchart/module-setup.sh16
-rwxr-xr-xmodules.d/01fips/module-setup.sh15
-rwxr-xr-xmodules.d/30convertfs/module-setup.sh5
-rwxr-xr-xmodules.d/40network/module-setup.sh12
-rwxr-xr-xmodules.d/45url-lib/module-setup.sh2
-rwxr-xr-xmodules.d/50plymouth/module-setup.sh2
-rwxr-xr-xmodules.d/80cms/module-setup.sh16
-rwxr-xr-xmodules.d/90btrfs/module-setup.sh4
-rwxr-xr-xmodules.d/90crypt/module-setup.sh6
-rwxr-xr-xmodules.d/90dm/module-setup.sh5
-rwxr-xr-xmodules.d/90dmsquash-live/module-setup.sh15
-rwxr-xr-xmodules.d/90kernel-modules/module-setup.sh4
-rwxr-xr-xmodules.d/90livenet/module-setup.sh2
-rwxr-xr-xmodules.d/90lvm/module-setup.sh2
-rwxr-xr-xmodules.d/90mdraid/module-setup.sh11
-rwxr-xr-xmodules.d/90multipath/module-setup.sh9
-rwxr-xr-xmodules.d/95debug/module-setup.sh6
-rwxr-xr-xmodules.d/95fcoe/module-setup.sh6
-rwxr-xr-xmodules.d/95fstab-sys/module-setup.sh2
-rwxr-xr-xmodules.d/95iscsi/module-setup.sh5
-rwxr-xr-xmodules.d/95nbd/module-setup.sh3
-rwxr-xr-xmodules.d/95nfs/module-setup.sh18
-rwxr-xr-xmodules.d/95ssh-client/module-setup.sh13
-rwxr-xr-xmodules.d/95udev-rules/module-setup.sh66
-rwxr-xr-xmodules.d/95zfcp/module-setup.sh9
-rwxr-xr-xmodules.d/95znet/module-setup.sh3
-rwxr-xr-xmodules.d/97masterkey/module-setup.sh3
-rwxr-xr-xmodules.d/98syslog/module-setup.sh7
-rwxr-xr-xmodules.d/98systemd/module-setup.sh39
-rwxr-xr-xmodules.d/99base/module-setup.sh10
-rwxr-xr-xmodules.d/99img-lib/module-setup.sh5
-rwxr-xr-xmodules.d/99shutdown/module-setup.sh3
32 files changed, 123 insertions, 201 deletions
diff --git a/modules.d/00bootchart/module-setup.sh b/modules.d/00bootchart/module-setup.sh
index a2a2c001..8a9f4702 100755
--- a/modules.d/00bootchart/module-setup.sh
+++ b/modules.d/00bootchart/module-setup.sh
@@ -13,17 +13,17 @@ depends() {
}
install() {
- inst /sbin/bootchartd
- inst /bin/bash
inst_symlink /init /sbin/init
inst_dir /lib/bootchart/tmpfs
- inst /lib/bootchart/bootchart-collector
- inst /etc/bootchartd.conf
- inst /sbin/accton
+
+ dracut_install bootchartd bash \
+ /lib/bootchart/bootchart-collector /etc/bootchartd.conf \
+ accton \
+ echo \
+ grep \
+ usleep
+
inst /usr/bin/pkill /bin/pkill
- inst /bin/echo
- inst /bin/grep
- inst /bin/usleep
inst /usr/bin/[ /bin/[
}
diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh
index a576a4af..9f76976e 100755
--- a/modules.d/01fips/module-setup.sh
+++ b/modules.d/01fips/module-setup.sh
@@ -31,19 +31,14 @@ install() {
local _dir
inst_hook pre-trigger 01 "$moddir/fips-boot.sh"
inst_hook pre-pivot 01 "$moddir/fips-noboot.sh"
- inst "$moddir/fips.sh" /sbin/fips.sh
+ inst_script "$moddir/fips.sh" /sbin/fips.sh
dracut_install sha512hmac rmmod insmod mount uname umount
- inst_libdir_file libsoftokn3.so
- inst_libdir_file libsoftokn3.so
- inst_libdir_file libsoftokn3.chk
- inst_libdir_file libfreebl3.so
- inst_libdir_file libfreebl3.chk
+ inst_libdir_file libsoftokn3.so libsoftokn3.so \
+ libsoftokn3.chk libfreebl3.so libfreebl3.chk \
+ 'hmaccalc/sha512hmac.hmac'
- inst_libdir_file 'hmaccalc/sha512hmac.hmac'
- if command -v prelink >/dev/null; then
- dracut_install prelink
- fi
+ dracut_install -o prelink
}
diff --git a/modules.d/30convertfs/module-setup.sh b/modules.d/30convertfs/module-setup.sh
index 48ffa3e8..d87e9357 100755
--- a/modules.d/30convertfs/module-setup.sh
+++ b/modules.d/30convertfs/module-setup.sh
@@ -12,9 +12,8 @@ depends() {
}
install() {
- dracut_install bash
- dracut_install find ldconfig mv rm cp ln
+ dracut_install bash find ldconfig mv rm cp ln
inst_hook pre-pivot 99 "$moddir/do-convertfs.sh"
- inst "$moddir/convertfs.sh" /usr/bin/convertfs
+ inst_script "$moddir/convertfs.sh" /usr/bin/convertfs
}
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
index 6077f535..0ec6b4ec 100755
--- a/modules.d/40network/module-setup.sh
+++ b/modules.d/40network/module-setup.sh
@@ -79,10 +79,10 @@ install() {
local _arch _i _dir
dracut_install ip arping tr dhclient
dracut_install -o brctl
- 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_script "$moddir/ifup.sh" "/sbin/ifup"
+ inst_script "$moddir/netroot.sh" "/sbin/netroot"
+ inst_script "$moddir/dhclient-script.sh" "/sbin/dhclient-script"
+ inst_simple "$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"
inst_hook pre-udev 60 "$moddir/net-genrules.sh"
@@ -96,7 +96,7 @@ install() {
_arch=$(uname -m)
- inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*"
- inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_mdns4_minimal.so.*"
+ inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \
+ {"tls/$_arch/",tls/,"$_arch/",}"libnss_mdns4_minimal.so.*"
}
diff --git a/modules.d/45url-lib/module-setup.sh b/modules.d/45url-lib/module-setup.sh
index eab9f255..ad8f55ea 100755
--- a/modules.d/45url-lib/module-setup.sh
+++ b/modules.d/45url-lib/module-setup.sh
@@ -12,7 +12,7 @@ depends() {
}
install() {
- inst "$moddir/url-lib.sh" "/lib/url-lib.sh"
+ inst_simple "$moddir/url-lib.sh" "/lib/url-lib.sh"
dracut_install curl
mkdir -m 0755 -p "$initdir/etc/ssl/certs"
if ! inst_any -t /etc/ssl/certs/ca-bundle.crt \
diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh
index 616d9b29..9cdcc637 100755
--- a/modules.d/50plymouth/module-setup.sh
+++ b/modules.d/50plymouth/module-setup.sh
@@ -76,6 +76,6 @@ install() {
inst_hook pre-pivot 90 "$moddir"/plymouth-newroot.sh
inst_hook pre-trigger 10 "$moddir"/plymouth-pretrigger.sh
inst_hook emergency 50 "$moddir"/plymouth-emergency.sh
- inst readlink
+ dracut_install readlink
}
diff --git a/modules.d/80cms/module-setup.sh b/modules.d/80cms/module-setup.sh
index 15dce89e..87f34e32 100755
--- a/modules.d/80cms/module-setup.sh
+++ b/modules.d/80cms/module-setup.sh
@@ -22,17 +22,11 @@ installkernel() {
install() {
inst_hook pre-trigger 30 "$moddir/cmssetup.sh"
inst_hook pre-pivot 95 "$moddir/cms-write-ifcfg.sh"
- inst "$moddir/cmsifup.sh" /sbin/cmsifup
- inst /etc/cmsfs-fuse/filetypes.conf
- inst /etc/udev/rules.d/99-fuse.rules
- inst /etc/fuse.conf
-
- for file in $(rpm -ql s390utils-base); do
- [[ -f $file ]] && inst $file
- done
+ inst_script "$moddir/cmsifup.sh" /sbin/cmsifup
+ dracut_install /etc/cmsfs-fuse/filetypes.conf /etc/udev/rules.d/99-fuse.rules /etc/fuse.conf \
+ cmsfs-fuse fusermount ulockmgr_server bash tr insmod rmmod cat normalize_dasd_arg \
+ $(rpm -ql s390utils-base)
inst_libdir_file "gconv/*"
-#inst /usr/lib/locale/locale-archive
-
- dracut_install cmsfs-fuse fusermount ulockmgr_server bash tr insmod rmmod cat normalize_dasd_arg
+ #inst /usr/lib/locale/locale-archive
}
diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh
index 7d8fae01..22f3f1cd 100755
--- a/modules.d/90btrfs/module-setup.sh
+++ b/modules.d/90btrfs/module-setup.sh
@@ -31,8 +31,8 @@ installkernel() {
install() {
inst_rules "$moddir/80-btrfs.rules"
- inst "$moddir/btrfs_finished.sh" /sbin/btrfs_finished
- inst "$moddir/btrfs_timeout.sh" /sbin/btrfs_timeout
+ inst_script "$moddir/btrfs_finished.sh" /sbin/btrfs_finished
+ inst_script "$moddir/btrfs_timeout.sh" /sbin/btrfs_timeout
dracut_install btrfs btrfsck
}
diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh
index 16d6f891..9b0bf641 100755
--- a/modules.d/90crypt/module-setup.sh
+++ b/modules.d/90crypt/module-setup.sh
@@ -42,12 +42,12 @@ installkernel() {
install() {
dracut_install cryptsetup rmdir readlink umount
- inst "$moddir"/cryptroot-ask.sh /sbin/cryptroot-ask
- inst "$moddir"/probe-keydev.sh /sbin/probe-keydev
+ inst_script "$moddir"/cryptroot-ask.sh /sbin/cryptroot-ask
+ inst_script "$moddir"/probe-keydev.sh /sbin/probe-keydev
inst_hook cmdline 10 "$moddir/parse-keydev.sh"
inst_hook cmdline 30 "$moddir/parse-crypt.sh"
inst_hook cleanup 30 "$moddir/crypt-cleanup.sh"
inst_simple /etc/crypttab
- inst "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh"
+ inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh"
}
diff --git a/modules.d/90dm/module-setup.sh b/modules.d/90dm/module-setup.sh
index 4209537e..8bc2ea4f 100755
--- a/modules.d/90dm/module-setup.sh
+++ b/modules.d/90dm/module-setup.sh
@@ -19,9 +19,8 @@ install() {
modinfo -k $kernel dm_mod >/dev/null 2>&1 && \
inst_hook pre-udev 30 "$moddir/dm-pre-udev.sh"
- inst dmsetup
-
- type -P dmeventd >/dev/null && dracut_install dmeventd
+ dracut_install dmsetup
+ dracut_install -o dmeventd
inst_libdir_file "libdevmapper-event.so*"
diff --git a/modules.d/90dmsquash-live/module-setup.sh b/modules.d/90dmsquash-live/module-setup.sh
index 1c792f4b..05603a53 100755
--- a/modules.d/90dmsquash-live/module-setup.sh
+++ b/modules.d/90dmsquash-live/module-setup.sh
@@ -20,22 +20,13 @@ installkernel() {
}
install() {
- dracut_install umount
- inst dmsetup
- inst blkid
- inst dd
- inst losetup
- inst grep
-
- dracut_install -o eject
-
- inst blockdev
- type -P checkisomd5 >/dev/null && inst checkisomd5
+ dracut_install umount dmsetup blkid dd losetup grep blockdev
+ dracut_install -o eject checkisomd5
inst_hook cmdline 30 "$moddir/parse-dmsquash-live.sh"
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.sh" "/sbin/dmsquash-live-root"
+ inst_script "$moddir/dmsquash-live-root.sh" "/sbin/dmsquash-live-root"
# should probably just be generally included
inst_rules 60-cdrom_id.rules
}
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
index 08f745aa..5361683b 100755
--- a/modules.d/90kernel-modules/module-setup.sh
+++ b/modules.d/90kernel-modules/module-setup.sh
@@ -88,9 +88,7 @@ installkernel() {
install() {
local _f i
[ -f /etc/modprobe.conf ] && dracut_install /etc/modprobe.conf
- for i in $(find -L /etc/modprobe.d/ -maxdepth 1 -type f -name '*.conf'); do
- inst_simple "$i"
- done
+ dracut_install $(find -L /etc/modprobe.d/ -maxdepth 1 -type f -name '*.conf')
inst_hook cmdline 01 "$moddir/parse-kernel.sh"
inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
}
diff --git a/modules.d/90livenet/module-setup.sh b/modules.d/90livenet/module-setup.sh
index 20715530..265f29e1 100755
--- a/modules.d/90livenet/module-setup.sh
+++ b/modules.d/90livenet/module-setup.sh
@@ -13,6 +13,6 @@ depends() {
install() {
inst_hook cmdline 29 "$moddir/parse-livenet.sh"
inst_hook initqueue/online 95 "$moddir/fetch-liveupdate.sh"
- inst "$moddir/livenetroot.sh" "/sbin/livenetroot"
+ inst_script "$moddir/livenetroot.sh" "/sbin/livenetroot"
}
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
index 5182b798..49ea114e 100755
--- a/modules.d/90lvm/module-setup.sh
+++ b/modules.d/90lvm/module-setup.sh
@@ -55,7 +55,7 @@ install() {
# files, but provides the one below:
inst_rules 64-device-mapper.rules
- inst "$moddir/lvm_scan.sh" /sbin/lvm_scan
+ inst_script "$moddir/lvm_scan.sh" /sbin/lvm_scan
inst_hook cmdline 30 "$moddir/parse-lvm.sh"
inst_libdir_file "libdevmapper-event-lvm*.so"
diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh
index 56f881e1..7b6f0a97 100755
--- a/modules.d/90mdraid/module-setup.sh
+++ b/modules.d/90mdraid/module-setup.sh
@@ -44,7 +44,7 @@ installkernel() {
install() {
dracut_install mdadm partx cat
-
+ dracut_install -o mdmon
# XXX: mdmon really needs to run as non-root?
# If so, write only the user it needs in the initrd's /etc/passwd (and maybe /etc/group)
@@ -79,16 +79,11 @@ install() {
fi
fi
- if [ -x /sbin/mdmon ] ; then
- dracut_install mdmon
- fi
inst_hook pre-udev 30 "$moddir/mdmon-pre-udev.sh"
-
- inst "$moddir/mdraid_start.sh" /sbin/mdraid_start
- inst "$moddir/mdadm_auto.sh" /sbin/mdadm_auto
inst_hook pre-trigger 30 "$moddir/parse-md.sh"
inst_hook pre-mount 10 "$moddir/mdraid-waitclean.sh"
- inst "$moddir/mdraid-cleanup.sh" /sbin/mdraid-cleanup
inst_hook shutdown 30 "$moddir/md-shutdown.sh"
+ inst_script "$moddir/mdraid-cleanup.sh" /sbin/mdraid-cleanup
+ inst_script "$moddir/mdraid_start.sh" /sbin/mdraid_start
}
diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh
index bfa4bf89..5944d255 100755
--- a/modules.d/90multipath/module-setup.sh
+++ b/modules.d/90multipath/module-setup.sh
@@ -69,7 +69,7 @@ installkernel() {
install() {
local _f
- for _f in \
+ dracut_install -o \
/sbin/dmsetup \
/sbin/kpartx \
/sbin/mpath_wait \
@@ -79,12 +79,9 @@ install() {
/sbin/xdrgetprio \
/etc/xdrdevices.conf \
/etc/multipath.conf \
- /etc/multipath/*; do
- [ -e "$_f" ] && inst "$_f"
- done
+ /etc/multipath/*
- inst_libdir_file "libmultipath*"
- inst_libdir_file "multipath/*"
+ inst_libdir_file "libmultipath*" "multipath/*"
inst_hook pre-trigger 02 "$moddir/multipathd.sh"
inst_hook cleanup 02 "$moddir/multipathd-stop.sh"
diff --git a/modules.d/95debug/module-setup.sh b/modules.d/95debug/module-setup.sh
index 61830691..f8be7a5d 100755
--- a/modules.d/95debug/module-setup.sh
+++ b/modules.d/95debug/module-setup.sh
@@ -12,9 +12,9 @@ depends() {
}
install() {
- dracut_install -o ps grep more cat rm strace free showmount
- dracut_install -o ping netstat rpcinfo vi scp ping6 ssh
- dracut_install -o fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.vfat e2fsck
+ dracut_install -o ps grep more cat rm strace free showmount \
+ ping netstat rpcinfo vi scp ping6 ssh \
+ fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.vfat e2fsck
}
diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh
index 272c83e4..19154adc 100755
--- a/modules.d/95fcoe/module-setup.sh
+++ b/modules.d/95fcoe/module-setup.sh
@@ -21,11 +21,7 @@ installkernel() {
}
install() {
- dracut_install ip
- inst dcbtool
- inst fipvlan
- inst lldpad
- inst readlink
+ dracut_install ip dcbtool fipvlan lldpad readlink
mkdir -m 0755 -p "$initdir/var/lib/lldpad"
diff --git a/modules.d/95fstab-sys/module-setup.sh b/modules.d/95fstab-sys/module-setup.sh
index 56dd8fcd..84684486 100755
--- a/modules.d/95fstab-sys/module-setup.sh
+++ b/modules.d/95fstab-sys/module-setup.sh
@@ -11,7 +11,7 @@ depends() {
}
install() {
- [ -f /etc/fstab.sys ] && inst /etc/fstab.sys
+ [ -f /etc/fstab.sys ] && inst_simple /etc/fstab.sys
inst_hook pre-pivot 00 "$moddir/mount-sys.sh"
inst_hook cmdline 00 "$moddir/wait-mount-dev.sh"
}
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
index 1787f922..a67dfa4d 100755
--- a/modules.d/95iscsi/module-setup.sh
+++ b/modules.d/95iscsi/module-setup.sh
@@ -74,11 +74,8 @@ installkernel() {
}
install() {
- dracut_install umount
+ dracut_install umount iscsistart hostname iscsi-iname
dracut_install -o iscsiuio
- inst iscsistart
- inst hostname
- inst iscsi-iname
inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh"
inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh"
inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot"
diff --git a/modules.d/95nbd/module-setup.sh b/modules.d/95nbd/module-setup.sh
index 092aade4..b082af0c 100755
--- a/modules.d/95nbd/module-setup.sh
+++ b/modules.d/95nbd/module-setup.sh
@@ -32,7 +32,6 @@ installkernel() {
install() {
inst nbd-client
inst_hook cmdline 90 "$moddir/parse-nbdroot.sh"
-
- inst "$moddir/nbdroot.sh" "/sbin/nbdroot"
+ inst_script "$moddir/nbdroot.sh" "/sbin/nbdroot"
}
diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh
index fb4dc9cc..b170de5f 100755
--- a/modules.d/95nfs/module-setup.sh
+++ b/modules.d/95nfs/module-setup.sh
@@ -31,21 +31,11 @@ installkernel() {
install() {
local _i
local _nsslibs
- type -P portmap >/dev/null && dracut_install portmap
- type -P rpcbind >/dev/null && dracut_install rpcbind
+ dracut_install -o portmap rpcbind rpc.statd mount.nfs \
+ mount.nfs4 umount rpc.idmapd sed /etc/netconfig
+ dracut_install /etc/services /etc/nsswitch.conf /etc/rpc /etc/protocols /etc/idmapd.conf
- dracut_install rpc.statd mount.nfs mount.nfs4 umount
- [ -f /etc/netconfig ] && inst_simple /etc/netconfig
- inst_simple /etc/services
- for i in /etc/nsswitch.conf /etc/rpc /etc/protocols /etc/idmapd.conf; do
- inst_simple $i
- done
- dracut_install rpc.idmapd
- dracut_install sed
-
- inst_libdir_file 'libnfsidmap_nsswitch.so*'
- inst_libdir_file 'libnfsidmap/*.so'
- inst_libdir_file 'libnfsidmap*.so*'
+ inst_libdir_file 'libnfsidmap_nsswitch.so*' 'libnfsidmap/*.so' 'libnfsidmap*.so*'
_nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' /etc/nsswitch.conf \
| tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|')
diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh
index 8d62b2dd..5a38f8ff 100755
--- a/modules.d/95ssh-client/module-setup.sh
+++ b/modules.d/95ssh-client/module-setup.sh
@@ -37,14 +37,14 @@ inst_sshenv()
# Copy over ssh key and knowhosts if needed
[[ $sshkey ]] && {
- inst $sshkey
- [[ -f /root/.ssh/known_hosts ]] && inst /root/.ssh/known_hosts
- [[ -f /etc/ssh/ssh_known_hosts ]] && inst /etc/ssh/ssh_known_hosts
+ inst_simple $sshkey
+ [[ -f /root/.ssh/known_hosts ]] && inst_simple /root/.ssh/known_hosts
+ [[ -f /etc/ssh/ssh_known_hosts ]] && inst_simple /etc/ssh/ssh_known_hosts
}
# Copy over root and system-wide ssh configs.
- [[ -f /root/.ssh/config ]] && inst /root/.ssh/config
- [[ -f /etc/ssh/ssh_config ]] && inst /etc/ssh/ssh_config
+ [[ -f /root/.ssh/config ]] && inst_simple /root/.ssh/config
+ [[ -f /etc/ssh/ssh_config ]] && inst_simple /etc/ssh/ssh_config
return 0
}
@@ -55,8 +55,7 @@ install() {
return 1
}
- inst ssh
- inst scp
+ dracut_install ssh scp
inst_sshenv
}
diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh
index f98de576..90d43369 100755
--- a/modules.d/95udev-rules/module-setup.sh
+++ b/modules.d/95udev-rules/module-setup.sh
@@ -8,7 +8,9 @@ install() {
# Fixme: would be nice if we didn't have to know which rules to grab....
# ultimately, /lib/initramfs/rules.d or somesuch which includes links/copies
# of the rules we want so that we just copy those in would be best
- dracut_install udevadm
+ dracut_install udevadm cat uname basename blkid \
+ /etc/udev/udev.conf /etc/group
+
[ -d ${initdir}/lib/systemd ] || mkdir -p ${initdir}/lib/systemd
for _i in ${systemdutildir}/systemd-udevd ${udevdir}/udevd /sbin/udevd; do
[ -x "$_i" ] || continue
@@ -20,53 +22,37 @@ install() {
break
done
- for i in /etc/udev/udev.conf /etc/group; do
- inst_simple $i
- done
-
- dracut_install basename
-
inst_rules 50-udev-default.rules 60-persistent-storage.rules \
61-persistent-storage-edd.rules 80-drivers.rules 95-udev-late.rules \
- 60-pcmcia.rules
- #Some debian udev rules are named differently
- inst_rules 50-udev.rules 95-late.rules
-
- # for firmware loading
- inst_rules 50-firmware.rules
- dracut_install cat uname
-
+ 60-pcmcia.rules \
+ 50-udev.rules 95-late.rules \
+ 50-firmware.rules \
+ "$moddir/59-persistent-storage.rules" \
+ "$moddir/61-persistent-storage.rules"
inst_dir /run/udev
inst_dir /run/udev/rules.d
- dracut_install blkid
- inst_rules "$moddir/59-persistent-storage.rules"
- inst_rules "$moddir/61-persistent-storage.rules"
-
- for _i in \
- ata_id \
- cdrom_id \
- create_floppy_devices \
- edd_id \
- firmware.sh \
- firmware \
- firmware.agent \
- hotplug.functions \
- fw_unit_symlinks.sh \
- hid2hci \
- path_id \
- input_id \
- scsi_id \
- usb_id \
- pcmcia-socket-startup \
- pcmcia-check-broken-cis \
- ; do
- [ -e ${udevdir}/$_i ] && dracut_install ${udevdir}/$_i
- done
+ dracut_install -o \
+ ${udevdir}/ata_id \
+ ${udevdir}/cdrom_id \
+ ${udevdir}/create_floppy_devices \
+ ${udevdir}/edd_id \
+ ${udevdir}/firmware.sh \
+ ${udevdir}/firmware \
+ ${udevdir}/firmware.agent \
+ ${udevdir}/hotplug.functions \
+ ${udevdir}/fw_unit_symlinks.sh \
+ ${udevdir}/hid2hci \
+ ${udevdir}/path_id \
+ ${udevdir}/input_id \
+ ${udevdir}/scsi_id \
+ ${udevdir}/usb_id \
+ ${udevdir}/pcmcia-socket-startup \
+ ${udevdir}/pcmcia-check-broken-cis
[ -f /etc/arch-release ] && \
- inst "$moddir/load-modules.sh" /lib/udev/load-modules.sh
+ inst_script "$moddir/load-modules.sh" /lib/udev/load-modules.sh
inst_libdir_file "libnss_files*"
}
diff --git a/modules.d/95zfcp/module-setup.sh b/modules.d/95zfcp/module-setup.sh
index cb0b7198..bbfdd276 100755
--- a/modules.d/95zfcp/module-setup.sh
+++ b/modules.d/95zfcp/module-setup.sh
@@ -22,13 +22,12 @@ installkernel() {
install() {
inst_hook cmdline 30 "$moddir/parse-zfcp.sh"
- dracut_install tr
+ dracut_install tr zfcp_cio_free grep sed seq
- inst /sbin/zfcpconf.sh
+ inst_script /sbin/zfcpconf.sh
inst_rules 56-zfcp.rules
if [[ $hostonly ]]; then
- inst /etc/zfcp.conf
+ inst_simple /etc/zfcp.conf
fi
- dracut_install zfcp_cio_free grep sed seq
-} \ No newline at end of file
+}
diff --git a/modules.d/95znet/module-setup.sh b/modules.d/95znet/module-setup.sh
index b354947d..b2ffa10c 100755
--- a/modules.d/95znet/module-setup.sh
+++ b/modules.d/95znet/module-setup.sh
@@ -19,8 +19,7 @@ installkernel() {
install() {
inst_hook cmdline 30 "$moddir/parse-ccw.sh"
- inst /lib/udev/ccw_init
inst_rules 81-ccw.rules
- dracut_install znet_cio_free grep sed seq readlink
+ dracut_install znet_cio_free grep sed seq readlink /lib/udev/ccw_init
}
diff --git a/modules.d/97masterkey/module-setup.sh b/modules.d/97masterkey/module-setup.sh
index 11b66be3..e239cac8 100755
--- a/modules.d/97masterkey/module-setup.sh
+++ b/modules.d/97masterkey/module-setup.sh
@@ -19,7 +19,6 @@ installkernel() {
}
install() {
- inst keyctl
- inst uname
+ dracut_install keyctl uname
inst_hook pre-pivot 60 "$moddir/masterkey.sh"
}
diff --git a/modules.d/98syslog/module-setup.sh b/modules.d/98syslog/module-setup.sh
index bd6e92ce..91d2cf1b 100755
--- a/modules.d/98syslog/module-setup.sh
+++ b/modules.d/98syslog/module-setup.sh
@@ -16,9 +16,7 @@ install() {
local _installs
if type -P rsyslogd >/dev/null; then
_installs="rsyslogd"
- inst_libdir_file rsyslog/lmnet.so
- inst_libdir_file rsyslog/imklog.so
- inst_libdir_file rsyslog/imuxsock.so
+ inst_libdir_file rsyslog/lmnet.so rsyslog/imklog.so rsyslog/imuxsock.so
elif type -P syslogd >/dev/null; then
_installs="syslogd"
elif type -P syslog-ng >/dev/null; then
@@ -28,8 +26,7 @@ install() {
"is selected to be installed. Please check."
fi
if [ -n "$_installs" ]; then
- dracut_install cat
- dracut_install $_installs
+ dracut_install cat $_installs
inst_hook cmdline 90 "$moddir/parse-syslog-opts.sh"
inst_hook pre-udev 61 "$moddir/syslog-genrules.sh"
inst_hook cleanup 99 "$moddir/syslog-cleanup.sh"
diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh
index 338f14d6..d7127246 100755
--- a/modules.d/98systemd/module-setup.sh
+++ b/modules.d/98systemd/module-setup.sh
@@ -17,7 +17,7 @@ depends() {
}
install() {
- dracut_install -o "$i" \
+ dracut_install -o \
$systemdutildir/systemd \
$systemdutildir/systemd-cgroups-agent \
$systemdutildir/systemd-initctl \
@@ -85,13 +85,8 @@ install() {
$systemdsystemunitdir/syslog.target \
$systemdsystemunitdir/initrd-switch-root.target \
$systemdsystemunitdir/initrd-switch-root.service \
- $systemdsystemunitdir/umount.target
-
- for i in /etc/systemd/*.conf; do
- dracut_install "$i"
- done
-
- dracut_install journalctl systemctl echo
+ $systemdsystemunitdir/umount.target \
+ journalctl systemctl echo
if [[ $hostonly ]]; then
dracut_install -o /etc/systemd/journald.conf \
@@ -109,35 +104,35 @@ install() {
ln -fs $systemdutildir/systemd "$initdir/init"
rm -f "${initdir}${systemdsystemunitdir}/emergency.service"
- inst "$moddir/emergency.service" ${systemdsystemunitdir}/emergency.service
+ inst_simple "$moddir/emergency.service" ${systemdsystemunitdir}/emergency.service
rm -f "${initdir}${systemdsystemunitdir}/rescue.service"
- inst "$moddir/rescue.service" ${systemdsystemunitdir}/rescue.service
+ inst_simple "$moddir/rescue.service" ${systemdsystemunitdir}/rescue.service
- inst "$moddir/initrd-switch-root.target" ${systemdsystemunitdir}/initrd-switch-root.target
- inst "$moddir/initrd-switch-root.service" ${systemdsystemunitdir}/initrd-switch-root.service
+ inst_simple "$moddir/initrd-switch-root.target" ${systemdsystemunitdir}/initrd-switch-root.target
+ inst_simple "$moddir/initrd-switch-root.service" ${systemdsystemunitdir}/initrd-switch-root.service
ln -fs basic.target "${initdir}${systemdsystemunitdir}/default.target"
mkdir -p "${initdir}${systemdsystemunitdir}/basic.target.wants"
- inst "$moddir/dracut-cmdline.sh" /bin/dracut-cmdline
- inst "$moddir/dracut-cmdline.service" ${systemdsystemunitdir}/dracut-cmdline.service
+ inst_script "$moddir/dracut-cmdline.sh" /bin/dracut-cmdline
+ inst_simple "$moddir/dracut-cmdline.service" ${systemdsystemunitdir}/dracut-cmdline.service
ln -fs ../dracut-cmdline.service "${initdir}${systemdsystemunitdir}/basic.target.wants/dracut-cmdline.service"
- inst "$moddir/dracut-pre-udev.sh" /bin/dracut-pre-udev
- inst "$moddir/dracut-pre-udev.service" ${systemdsystemunitdir}/dracut-pre-udev.service
+ inst_script "$moddir/dracut-pre-udev.sh" /bin/dracut-pre-udev
+ inst_simple "$moddir/dracut-pre-udev.service" ${systemdsystemunitdir}/dracut-pre-udev.service
ln -fs ../dracut-pre-udev.service "${initdir}${systemdsystemunitdir}/basic.target.wants/dracut-pre-udev.service"
- inst "$moddir/dracut-pre-trigger.sh" /bin/dracut-pre-trigger
- inst "$moddir/dracut-pre-trigger.service" ${systemdsystemunitdir}/dracut-pre-trigger.service
+ inst_script "$moddir/dracut-pre-trigger.sh" /bin/dracut-pre-trigger
+ inst_simple "$moddir/dracut-pre-trigger.service" ${systemdsystemunitdir}/dracut-pre-trigger.service
ln -fs ../dracut-pre-trigger.service "${initdir}${systemdsystemunitdir}/basic.target.wants/dracut-pre-trigger.service"
- inst "$moddir/dracut-initqueue.sh" /bin/dracut-initqueue
- inst "$moddir/dracut-initqueue.service" ${systemdsystemunitdir}/dracut-initqueue.service
+ inst_script "$moddir/dracut-initqueue.sh" /bin/dracut-initqueue
+ inst_simple "$moddir/dracut-initqueue.service" ${systemdsystemunitdir}/dracut-initqueue.service
ln -fs ../dracut-initqueue.service "${initdir}${systemdsystemunitdir}/basic.target.wants/dracut-initqueue.service"
- inst "$moddir/dracut-pre-pivot.sh" /bin/dracut-pre-pivot
- inst "$moddir/dracut-pre-pivot.service" ${systemdsystemunitdir}/dracut-pre-pivot.service
+ inst_script "$moddir/dracut-pre-pivot.sh" /bin/dracut-pre-pivot
+ inst_simple "$moddir/dracut-pre-pivot.service" ${systemdsystemunitdir}/dracut-pre-pivot.service
mkdir -p "${initdir}${systemdsystemunitdir}/initrd-switch-root.target.wants"
ln -fs ../dracut-pre-pivot.service "${initdir}${systemdsystemunitdir}/initrd-switch-root.target.wants/dracut-pre-pivot.service"
diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh
index 75afa721..f20ca1ae 100755
--- a/modules.d/99base/module-setup.sh
+++ b/modules.d/99base/module-setup.sh
@@ -26,9 +26,9 @@ install() {
egrep '^nobody:' /etc/passwd >> "$initdir/etc/passwd"
# install our scripts and hooks
- inst "$moddir/init.sh" "/init"
- inst "$moddir/initqueue.sh" "/sbin/initqueue"
- inst "$moddir/loginit.sh" "/sbin/loginit"
+ inst_script "$moddir/init.sh" "/init"
+ inst_script "$moddir/initqueue.sh" "/sbin/initqueue"
+ inst_script "$moddir/loginit.sh" "/sbin/loginit"
[ -e "${initdir}/lib" ] || mkdir -m 0755 -p ${initdir}/lib
mkdir -m 0755 -p ${initdir}/lib/dracut
@@ -38,8 +38,8 @@ install() {
dracut_install switch_root || dfatal "Failed to install switch_root"
- inst "$moddir/dracut-lib.sh" "/lib/dracut-lib.sh"
- inst "$moddir/mount-hook.sh" "/usr/bin/mount-hook"
+ inst_simple "$moddir/dracut-lib.sh" "/lib/dracut-lib.sh"
+ inst_script "$moddir/mount-hook.sh" "/usr/bin/mount-hook"
inst_hook cmdline 10 "$moddir/parse-root-opts.sh"
mkdir -p "${initdir}/var"
[ -x /lib/systemd/systemd-timestamp ] && inst /lib/systemd/systemd-timestamp
diff --git a/modules.d/99img-lib/module-setup.sh b/modules.d/99img-lib/module-setup.sh
index f0e6dacf..9ff5d7c1 100755
--- a/modules.d/99img-lib/module-setup.sh
+++ b/modules.d/99img-lib/module-setup.sh
@@ -15,9 +15,8 @@ depends() {
install() {
# NOTE/TODO: we require bash, but I don't know how to specify that..
dracut_install tar gzip dd
- dracut_install -o cpio xz
# TODO: make this conditional on a cmdline flag / config option
- dracut_install -o bzip2
- inst "$moddir/img-lib.sh" "/lib/img-lib.sh"
+ dracut_install -o cpio xz bzip2
+ inst_simple "$moddir/img-lib.sh" "/lib/img-lib.sh"
}
diff --git a/modules.d/99shutdown/module-setup.sh b/modules.d/99shutdown/module-setup.sh
index 659e2cf9..16e727ce 100755
--- a/modules.d/99shutdown/module-setup.sh
+++ b/modules.d/99shutdown/module-setup.sh
@@ -13,8 +13,7 @@ depends() {
install() {
local _d
- dracut_install umount
- dracut_install poweroff reboot halt
+ dracut_install umount poweroff reboot halt
dracut_install -o kexec
inst "$moddir/shutdown.sh" "$prefix/shutdown"
[ -e "${initdir}/lib" ] || mkdir -m 0755 -p ${initdir}/lib