]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
use inst_simple to install non-binary files
authorHarald Hoyer <harald@redhat.com>
Fri, 12 Aug 2011 11:11:30 +0000 (13:11 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 12 Aug 2011 11:11:30 +0000 (13:11 +0200)
dracut
dracut-functions
modules.d/10i18n/module-setup.sh
modules.d/40network/module-setup.sh
modules.d/90crypt/module-setup.sh
modules.d/90kernel-modules/module-setup.sh
modules.d/90livenet/module-setup.sh
modules.d/90lvm/module-setup.sh
modules.d/95nfs/module-setup.sh
modules.d/95terminfo/module-setup.sh
modules.d/95udev-rules/module-setup.sh

diff --git a/dracut b/dracut
index c9fb6d535b565e6c051247f42464578aade649f2..9f70b5fefe8e1e62ace7b1b6a2624477b179b256 100755 (executable)
--- a/dracut
+++ b/dracut
@@ -593,7 +593,7 @@ unset item
 if [[ $kernel_only != yes ]]; then
     # make sure that library links are correct and up to date
     for f in /etc/ld.so.conf /etc/ld.so.conf.d/*; do
-        [[ -e $f ]] && dracut_install "$f"
+        [[ -e $f ]] && inst_simple "$f"
     done
     if ! ldconfig -r "$initdir"; then
         if [[ $UID = 0 ]]; then
index d44695937473ebac871aab4232b22f3e53645a8c..6c29170dbf06efa7fecb6c7812e309a654052249 100755 (executable)
@@ -316,7 +316,7 @@ inst_simple() {
     fi
     # install checksum files also
     if [[ -e "${_src%/*}/.${_src##*/}.hmac" ]]; then
-        inst "${_src%/*}/.${_src##*/}.hmac" "${target%/*}/.${target##*/}.hmac"
+        inst_simple "${_src%/*}/.${_src##*/}.hmac" "${target%/*}/.${target##*/}.hmac"
     fi
     ddebug "Installing $_src"
     cp -pfL "$_src" "${initdir}$target" 
@@ -356,7 +356,7 @@ inst_library() {
     if [[ -L $_src ]]; then
         # install checksum files also
         if [[ -e "${_src%/*}/.${_src##*/}.hmac" ]]; then
-            inst "${_src%/*}/.${_src##*/}.hmac" "${_dest%/*}/.${_dest##*/}.hmac"
+            inst_simple "${_src%/*}/.${_src##*/}.hmac" "${_dest%/*}/.${_dest##*/}.hmac"
         fi
         _reallib=$(readlink -f "$_src")
         inst_simple "$_reallib" "$_reallib"
index 5b61f94db256faf6b07394866bc5a76570735127..5c091004829f2bfccbccad8b91332c82728daec1 100755 (executable)
@@ -93,7 +93,7 @@ install() {
 
         for f in $(eval find ${kbddir}/{${KBDSUBDIRS}} -type f -print)
         do
-            inst $f
+            inst_simple $f
         done
 
         # remove unnecessary files
@@ -141,13 +141,13 @@ install() {
         if [[ ${FONT_MAP} ]]
         then
             FONT_MAP=${FONT_MAP%.trans}
-            inst ${kbddir}/consoletrans/${FONT_MAP}.trans
+            inst_simple ${kbddir}/consoletrans/${FONT_MAP}.trans
         fi
 
         if [[ ${FONT_UNIMAP} ]]
         then
             FONT_UNIMAP=${FONT_UNIMAP%.uni}
-            inst ${kbddir}/unimaps/${FONT_UNIMAP}.uni
+            inst_simple ${kbddir}/unimaps/${FONT_UNIMAP}.uni
         fi
 
         if [[ ${UNICODE} ]]
index 1cb7ebcf4b5b0c9d4edc465f9a121342d5d35796..39366b61310c10781ea6a199ce0df535c1e26f2d 100755 (executable)
@@ -49,7 +49,7 @@ install() {
     inst "$moddir/ifup" "/sbin/ifup"
     inst "$moddir/netroot" "/sbin/netroot"
     inst "$moddir/dhclient-script" "/sbin/dhclient-script"
-    inst "$moddir/dhclient.conf" "/etc/dhclient.conf"
+    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"
     inst_hook cmdline 91 "$moddir/dhcp-root.sh"
index 3eac9bb1eab889782f00e1a3d481b3c6956998b6..2a8268f424379d8683927f4219d6ce06d656d1f8 100755 (executable)
@@ -42,7 +42,7 @@ install() {
     inst_hook cmdline 10 "$moddir/parse-keydev.sh"
     inst_hook cmdline 30 "$moddir/parse-crypt.sh"
     inst_hook pre-pivot 30 "$moddir/crypt-cleanup.sh"
-    inst /etc/crypttab
+    inst_simple /etc/crypttab
     inst "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh"
 }
 
index 26fee549a89b5e0c3282dc72f14b9e96244d348e..245ec0bde3380975787e6291652da74b71171908 100755 (executable)
@@ -45,14 +45,16 @@ installkernel() {
 install() {
     local _f
     [ -f /etc/modprobe.conf ] && dracut_install /etc/modprobe.conf
-    dracut_install $(find /etc/modprobe.d/ -type f -name '*.conf')
+    for i in $(find /etc/modprobe.d/ -type f -name '*.conf'); do
+        inst_simple "$i"
+    done
     inst_hook cmdline 01 "$moddir/parse-kernel.sh"
     inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
 
     local f
 
     for _f in modules.builtin.bin modules.builtin; do
-        [[ $srcmods/$_f ]] && inst "$srcmods/$_f" "/lib/modules/$kernel/$_f" \
+        [[ $srcmods/$_f ]] && inst_simple "$srcmods/$_f" "/lib/modules/$kernel/$_f" \
             && break
     done || {
         dfatal "No modules.builtin.bin and modules.builtin found!"
index aacff8f642009900b0e9ff54348cdcffb736d226..3ae72de2851b40937b79fe910f862a4f33e1ce9c 100755 (executable)
@@ -15,7 +15,7 @@ depends() {
 install() {
     dracut_install wget
     mkdir -m 0755 -p "$initdir/etc/ssl/certs"
-    if ! inst /etc/ssl/certs/ca-bundle.crt; then
+    if ! inst_simple /etc/ssl/certs/ca-bundle.crt; then
         dwarn "Couldn't find SSL CA cert bundle; HTTPS won't work."
     fi
 
index c35d67327d1369086664d4525577fc2a1eaf5e43..e5ef94e6817f82052cf94bbcdd551def62ae094a 100755 (executable)
@@ -41,7 +41,7 @@ install() {
 
     if [[ $hostonly ]] || [[ $lvmconf = "yes" ]]; then
         if [ -f /etc/lvm/lvm.conf ]; then
-            inst /etc/lvm/lvm.conf
+            inst_simple /etc/lvm/lvm.conf
             # FIXME: near-term hack to establish read-only locking;
             # use command-line lvm.conf editor once it is available
             sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type = 4/' ${initdir}/etc/lvm/lvm.conf
index 72650fd29918e20f24d8db2cf9abda9a30e310b2..c5f97c92578a50ea88c1d71d30d3fe1711927145 100755 (executable)
@@ -29,10 +29,12 @@ install() {
     type -P rpcbind >/dev/null && dracut_install rpcbind
 
     dracut_install rpc.statd mount.nfs mount.nfs4 umount
-    [ -f /etc/netconfig ] && dracut_install /etc/netconfig
-    dracut_install /etc/services
-    dracut_install /etc/nsswitch.conf /etc/rpc /etc/protocols
-    dracut_install rpc.idmapd /etc/idmapd.conf
+    [ -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
 
     for _i in {"$libdir","$usrlibdir"}/libnfsidmap_nsswitch.so* \
index 41a5ba3d6ee0c0b132c230e106153e4f2c22223b..3ecd462a7039280721d88cc6dee325a094a38ea6 100755 (executable)
@@ -9,7 +9,10 @@ install() {
         [ -d ${_terminfodir} ] && break
     done
 
-    [ -d ${_terminfodir} ] && \
-        dracut_install $(find ${_terminfodir} -type f)
+    if [ -d ${_terminfodir} ]; then
+        for f in $(find ${_terminfodir} -type f); do
+            inst_simple $f
+        done
+    fi
 }
 
index c2ec2327f48a32aa17aa9229241a53227884ac58..5bd5d59f70d4931e504503d653008fd2409ecf07 100755 (executable)
@@ -7,7 +7,10 @@ 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 udevd udevadm /etc/udev/udev.conf /etc/group
+    dracut_install udevd udevadm
+    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 \