command=`basename $file`
fullfile=`which $command 2> /dev/null`
if [ x$fullfile != x ] ; then
- echo "updating $command in roottree with $fullfile"
+# echo "updating $command in roottree with $fullfile"
cp -fpd $fullfile $file
if [ $? != 0 ] ; then
echo "Update failed."
cd roottree/sbin
ln -sf halt reboot
+# Eliminate recursive link
+rm -f sbin
cd $TOPDIR
# Copy all needed shared libraries
cp -fp /lib/ld-linux.so.* roottree/lib/
strip `find roottree/lib/ -maxdepth 1 -type f` 2>/dev/null
+# Grab grub crap
+if [ -e /usr/share/grub ] ; then
+ mkdir -p roottree/usr/share/grub
+ cp -fpr /usr/share/grub/* roottree/usr/share/grub
+elif [ -e /lib/grub ] ; then
+ mkdir -p roottree/lib/grub
+ cp -fpr /lib/grub/* roottree/lib/grub
+else
+ echo "======= Warning could not find grub scripts ========"
+fi
#
# Get a bunch of stuff from /etc
if [ -e /etc/ssh ] ; then
cp -a /etc/ssh roottree/etc/
- echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
- echo "!!!! !!!!"
- echo "!!!! Warning your /etc/ssh directory was copied. !!!!"
- echo "!!!! Keep this directory and the CDROM secure. !!!!"
- echo "!!!! !!!!"
- echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
+ echo "====================================================="
+ echo "==== ===="
+ echo "==== Warning your /etc/ssh directory was copied. ===="
+ echo "==== Keep this directory and the CDROM secure. ===="
+ echo "==== ===="
+ echo "====================================================="
fi
if [ -e /etc/security ] ; then
cp -a /etc/security roottree/etc/