Author: pierre
Date: Mon Sep 28 06:39:36 2020
New Revision: 23769

Log:
mkinitramfs: remove the link of sh to bash

This link is not needed: the shell scripts all have #!/bin/sh
Also remove redundant additions of mdadm and udevd, which are added
to sbinfiles in a loop, and move all the additions to sbinfiles
to the same place so that it is easier to see what is in there.

Modified:
   trunk/BOOK/postlfs/filesystems/initramfs.xml

Modified: trunk/BOOK/postlfs/filesystems/initramfs.xml
==============================================================================
--- trunk/BOOK/postlfs/filesystems/initramfs.xml        Sun Sep 27 05:51:26 
2020        (r23768)
+++ trunk/BOOK/postlfs/filesystems/initramfs.xml        Mon Sep 28 06:39:36 
2020        (r23769)
@@ -118,6 +118,10 @@
   if [ -x /sbin/$f ] ; then sbinfiles="$sbinfiles $f"; fi
 done
 
+# Add lvm if present (cannot be done with the others because it
+# also needs dmsetup
+if [ -x /sbin/lvm ] ; then sbinfiles="$sbinfiles lvm dmsetup"; fi
+
 unsorted=$(mktemp /tmp/unsorted.XXXXXXXXXX)
 
 DATADIR=/usr/share/mkinitramfs
@@ -173,16 +177,6 @@
   copy $d/$f bin
 done
 
-# Add lvm if present
-if [ -x /sbin/lvm ] ; then sbinfiles="$sbinfiles lvm dmsetup"; fi
-
-# Add mdadm if present
-if [ -x /sbin/mdadm ] ; then sbinfiles="$sbinfiles mdadm"; fi
-
-# Add udevd if present in /sbin (newer versions of udev have it in
-# /lib/udev)
-if [ -x /sbin/udevd ] ; then sbinfiles="$sbinfiles udevd"; fi
-
 for f in $sbinfiles ; do
   ldd /sbin/$f | sed "s/\t//" | cut -d " " -f1 >> $unsorted
   copy $f sbin
@@ -201,8 +195,6 @@
   ln -s kmod $WDIR/bin/insmod
 fi
 
-ln -s bash $WDIR/bin/sh
-
 # Add lvm symlinks if appropriate
 # Also copy the lvm.conf file
 if  [ -x /sbin/lvm ] ; then
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to