[Fai-commit] r4400 - in people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo: files/boot/grub/menu.lst hooks scripts/FAIBASE scripts/LAST
lazyboy-guest at alioth.debian.org
lazyboy-guest at alioth.debian.org
Fri Jul 6 00:40:05 UTC 2007
Author: lazyboy-guest
Date: 2007-07-06 00:40:05 +0000 (Fri, 06 Jul 2007)
New Revision: 4400
Modified:
people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo/files/boot/grub/menu.lst/postinst
people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo/hooks/instsoft.XENU
people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo/scripts/FAIBASE/10-misc
people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo/scripts/FAIBASE/30-interface
people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo/scripts/LAST/50-misc
Log:
make come scripts distribution-sensitive
Modified: people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo/files/boot/grub/menu.lst/postinst
===================================================================
--- people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo/files/boot/grub/menu.lst/postinst 2007-07-06 00:39:20 UTC (rev 4399)
+++ people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo/files/boot/grub/menu.lst/postinst 2007-07-06 00:40:05 UTC (rev 4400)
@@ -10,11 +10,16 @@
# if class NOMBR is defined, write boot loader into root partition, not into mbr
ifclass NOMBR && BOOT_DEVICE=$BOOT_PARTITION
-grub-install --no-floppy --root-directory=$target $BOOT_DEVICE
-GROOT=$(device2grub $BOOT_PARTITION)
-perl -pi -e 's/#(\w+)#/$ENV{$1}/' $2
-$ROOTCMD /usr/sbin/update-grub
-echo "Grub installed on $BOOT_DEVICE on $GROOT"
+if [ ! -z $BOOT_DEVICE ]; then
+ grub-install --no-floppy --root-directory=$target $BOOT_DEVICE
+ GROOT=$(device2grub $BOOT_PARTITION)
+ perl -pi -e 's/#(\w+)#/$ENV{$1}/' $2
+ ifclass DIST-DEBIAN && $ROOTCMD /usr/sbin/update-grub
+ # TODO: how to update grub on other distributions?
+ echo "Grub installed on $BOOT_DEVICE on $GROOT"
+else
+ echo "BOOT_DEVICE empty - not running grub-instll"
+fi
exit $error
Modified: people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo/hooks/instsoft.XENU
===================================================================
--- people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo/hooks/instsoft.XENU 2007-07-06 00:39:20 UTC (rev 4399)
+++ people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo/hooks/instsoft.XENU 2007-07-06 00:40:05 UTC (rev 4400)
@@ -1,4 +1,4 @@
#! /bin/sh
# make grub directory to get kernel installed
-$ROOTCMD mkdir /boot/grub
+[ -d $target/boot/grub ] || $ROOTCMD mkdir /boot/grub
$ROOTCMD touch /boot/grub/menu.lst
Modified: people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo/scripts/FAIBASE/10-misc
===================================================================
--- people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo/scripts/FAIBASE/10-misc 2007-07-06 00:39:20 UTC (rev 4399)
+++ people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo/scripts/FAIBASE/10-misc 2007-07-06 00:40:05 UTC (rev 4400)
@@ -32,8 +32,11 @@
fcopy -ir /root
# create keyboard layout table
-$ROOTCMD bash -c "echo 'console-data console-data/keymap/full select $KEYMAP' | debconf-set-selections"
-$ROOTCMD install-keymap $KEYMAP || true
+ifclass DIST-DEBIAN && {
+ $ROOTCMD bash -c "echo 'console-data console-data/keymap/full select $KEYMAP' | debconf-set-selections"
+ $ROOTCMD install-keymap $KEYMAP || true
+}
+
# dumpkeys | gzip -9f >$target/etc/console/boottime.kmap.gz
exit $error
Modified: people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo/scripts/FAIBASE/30-interface
===================================================================
--- people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo/scripts/FAIBASE/30-interface 2007-07-06 00:39:20 UTC (rev 4399)
+++ people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo/scripts/FAIBASE/30-interface 2007-07-06 00:40:05 UTC (rev 4400)
@@ -2,7 +2,7 @@
error=0 ; trap "error=$((error|1))" ERR
-if ifclass DHCPC
+if [ ifclass DHCPC && ifclass DIST-DEBIAN ]
then
cat > $target/etc/network/interfaces <<-EOF
# generated by FAI
@@ -10,7 +10,7 @@
iface lo inet loopback
iface eth0 inet dhcp
EOF
-else
+elif ifclass DIST-DEBIAN; then
[ -n "$IPADDR" ] && cat > $target/etc/network/interfaces <<-EOF
# generated by FAI
auto lo eth0
@@ -21,13 +21,18 @@
broadcast $BROADCAST
gateway $GATEWAYS
EOF
+fi
+
+ifclass DHCPC && {
[ -n "$NETWORK" ] && echo "localnet $NETWORK" > $target/etc/networks
[ -s /tmp/etc/resolv.conf ] && cp -p /tmp/etc/resolv.conf $target/etc
fcopy -i /etc/resolv.conf
-fi
+}
# here fcopy is mostly used, when installing a client for running in a
# different subnet than during the installation
-fcopy -iM /etc/network/interfaces /etc/networks
+if ifclass DIST-DEBIAN; then
+ fcopy -iM /etc/network/interfaces /etc/networks
+fi
exit $error
Modified: people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo/scripts/LAST/50-misc
===================================================================
--- people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo/scripts/LAST/50-misc 2007-07-06 00:39:20 UTC (rev 4399)
+++ people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo/scripts/LAST/50-misc 2007-07-06 00:40:05 UTC (rev 4400)
@@ -23,13 +23,15 @@
fi
# Make sure everything is configured properly
-echo "Running \"apt-get -f install\" for the last time."
-$ROOTCMD apt-get -f install
+if ifclass DIST-DEBIAN; then
+ echo "Running \"apt-get -f install\" for the last time."
+ $ROOTCMD apt-get -f install
+fi
lskernels=$(echo $target/boot/vmlinu*)
[ -f ${lskernels%% *} ] || echo "ERROR: No kernel was installed. Have a look at shell.log"
# copy sources.list
-fcopy -i /etc/apt/sources.list
+ifclass DIST-DEBIAN && fcopy -i /etc/apt/sources.list
exit $error
More information about the Fai-commit
mailing list