[Fai-commit] r5935 - in trunk: . debian examples/simple/class examples/simple/debconf examples/simple/files/boot/grub/menu.lst examples/simple/files/etc/kernel-img.conf examples/simple/hooks examples/simple/package_config examples/simple/scripts examples/simple/scripts/DEBIAN examples/simple/scripts/FAIBASE

Thomas Lange lange at alioth.debian.org
Tue Aug 3 00:32:42 UTC 2010


Author: lange
Date: 2010-08-03 00:32:42 +0000 (Tue, 03 Aug 2010)
New Revision: 5935

Added:
   trunk/examples/simple/debconf/DEBIAN
   trunk/examples/simple/debconf/XORG
   trunk/examples/simple/files/boot/grub/menu.lst/DEBIAN
   trunk/examples/simple/files/etc/kernel-img.conf/DEBIAN
   trunk/examples/simple/hooks/instsoft.DEBIAN
   trunk/examples/simple/package_config/DEBIAN
   trunk/examples/simple/scripts/DEBIAN/
   trunk/examples/simple/scripts/DEBIAN/10-keymap
   trunk/examples/simple/scripts/DEBIAN/10-rootpw
   trunk/examples/simple/scripts/DEBIAN/30-interface
   trunk/examples/simple/scripts/DEBIAN/40-misc
Removed:
   trunk/examples/simple/debconf/FAIBASE
   trunk/examples/simple/files/boot/grub/menu.lst/GRUB
   trunk/examples/simple/files/etc/kernel-img.conf/DEFAULT
   trunk/examples/simple/hooks/instsoft.FAIBASE
   trunk/examples/simple/package_config/DEFAULT
   trunk/examples/simple/scripts/FAIBASE/30-interface
Modified:
   trunk/THANKS
   trunk/debian/changelog
   trunk/examples/simple/class/50-host-classes
   trunk/examples/simple/package_config/FAIBASE
   trunk/examples/simple/scripts/FAIBASE/10-misc
Log:
* simple examples: move all Debian specific parts into new class DEBIAN
  (Thanks to Michael Goetze for the patch)
* THANKS: add Michael

Modified: trunk/THANKS
===================================================================
--- trunk/THANKS	2010-08-02 03:58:20 UTC (rev 5934)
+++ trunk/THANKS	2010-08-03 00:32:42 UTC (rev 5935)
@@ -20,6 +20,7 @@
 Niklaus Giger		ngiger at mus.ch
 Torge Gipp		post at torge-gipp.de
 Henning Glawe		glaweh at physik.fu-berlin.de
+Michael Goetze		mgoetze at mgoetze.net
 James Golovich		james at wwnet.net
 Constantin Hellweg	hellweg at informatik.uni-koeln.de
 Sebastian Hetze		s.hetze at linux-ag.com

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2010-08-02 03:58:20 UTC (rev 5934)
+++ trunk/debian/changelog	2010-08-03 00:32:42 UTC (rev 5935)
@@ -1,4 +1,4 @@
-fai (3.4~beta21) unstable; urgency=low
+fai (3.4~beta22) unstable; urgency=low
 
   [ Thomas Lange ]
   * get-config-dir-http: new script to get a tarball of the config space
@@ -107,6 +107,9 @@
     files (hosts, resolv.conf, sources.list, preferences) from the config
     space, if not found use version from the nfsroot. Also try whole
     directory tree /etc/apt from config space
+  * simple examples: move all Debian specific parts into new class DEBIAN
+    (Thanks to Michael Goetze for the patch)
+  * THANKS: add Michael
   
   [ Michael Tautschnig ]
   * setup-storage: Bumped version number to 1.3
@@ -184,7 +187,7 @@
     if the shortname has no match in device.map. Needed now that grub2 in
     unstable has switched to using stable names in device.map.
   
- -- Thomas Lange <lange at debian.org>  Sun, 01 Aug 2010 16:37:14 -0400
+ -- Thomas Lange <lange at debian.org>  Mon, 02 Aug 2010 20:29:43 -0400
 
 fai (3.3.5) unstable; urgency=high
 

Modified: trunk/examples/simple/class/50-host-classes
===================================================================
--- trunk/examples/simple/class/50-host-classes	2010-08-02 03:58:20 UTC (rev 5934)
+++ trunk/examples/simple/class/50-host-classes	2010-08-03 00:32:42 UTC (rev 5935)
@@ -5,19 +5,19 @@
 # use a list of classes for our demo machine
 case $HOSTNAME in
     faiserver)
-	echo "FAIBASE DEMO FAISERVER" ;;
+	echo "FAIBASE DEBIAN DEMO FAISERVER" ;;
     demohost)
-	echo "FAIBASE DHCPC DEMO" ;;
+	echo "FAIBASE DEBIAN DHCPC DEMO" ;;
     gnomehost)
-	echo "FAIBASE DHCPC DEMO XORG GNOME";;
+	echo "FAIBASE DEBIAN DHCPC DEMO XORG GNOME";;
     atom*)
-	echo "FAIBASE DHCPC DEMO" ;;
+	echo "FAIBASE DEBIAN DHCPC DEMO" ;;
     bear)
-	echo "FAIBASE DHCPC LVM_XEN_SERVER XEN" ;;
+	echo "FAIBASE DEBIAN DHCPC LVM_XEN_SERVER XEN" ;;
     puma)
-	echo "FAIBASE DHCPC RAID_XEN_VIRTUAL" ;;
+	echo "FAIBASE DEBIAN DHCPC RAID_XEN_VIRTUAL" ;;
     *)
-	echo "FAIBASE DHCPC" ;;
+	echo "FAIBASE DEBIAN DHCPC" ;;
 esac
 
 (ifclass I386 || ifclass AMD64) && echo GRUB 

Added: trunk/examples/simple/debconf/DEBIAN
===================================================================
--- trunk/examples/simple/debconf/DEBIAN	                        (rev 0)
+++ trunk/examples/simple/debconf/DEBIAN	2010-08-03 00:32:42 UTC (rev 5935)
@@ -0,0 +1,4 @@
+passwd passwd/shadow boolean true
+exim4-config exim4/dc_eximconfig_configtype select local delivery only; not on a network
+locales locales/default_environment_locale select en_US.UTF-8
+locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8

Deleted: trunk/examples/simple/debconf/FAIBASE
===================================================================
--- trunk/examples/simple/debconf/FAIBASE	2010-08-02 03:58:20 UTC (rev 5934)
+++ trunk/examples/simple/debconf/FAIBASE	2010-08-03 00:32:42 UTC (rev 5935)
@@ -1,9 +0,0 @@
-passwd passwd/shadow boolean true
-exim4-config exim4/dc_eximconfig_configtype select local delivery only; not on a network
-locales locales/default_environment_locale select en_US.UTF-8
-locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8
-xserver-xorg xserver-xorg/config/inputdevice/keyboard/model string pc105
-xserver-xorg    xserver-xorg/autodetect_monitor         boolean false
-xserver-xorg    xserver-xorg/autodetect_keyboard        boolean true
-xserver-xorg    xserver-xorg/autodetect_mouse           boolean true
-xserver-xorg    xserver-xorg/autodetect_video_card      boolean true

Added: trunk/examples/simple/debconf/XORG
===================================================================
--- trunk/examples/simple/debconf/XORG	                        (rev 0)
+++ trunk/examples/simple/debconf/XORG	2010-08-03 00:32:42 UTC (rev 5935)
@@ -0,0 +1,6 @@
+xserver-xorg xserver-xorg/config/inputdevice/keyboard/model string pc105
+xserver-xorg    xserver-xorg/autodetect_monitor         boolean false
+xserver-xorg    xserver-xorg/autodetect_keyboard        boolean true
+xserver-xorg    xserver-xorg/autodetect_mouse           boolean true
+xserver-xorg    xserver-xorg/autodetect_video_card      boolean true
+

Added: trunk/examples/simple/files/boot/grub/menu.lst/DEBIAN
===================================================================
--- trunk/examples/simple/files/boot/grub/menu.lst/DEBIAN	                        (rev 0)
+++ trunk/examples/simple/files/boot/grub/menu.lst/DEBIAN	2010-08-03 00:32:42 UTC (rev 5935)
@@ -0,0 +1,43 @@
+#
+timeout 5
+default 0
+color cyan/blue white/blue
+
+### BEGIN AUTOMAGIC KERNELS LIST
+## lines between the AUTOMAGIC KERNELS LIST markers will be modified
+## by the debian update-grub script except for the default optons below
+
+## DO NOT UNCOMMENT THEM, Just edit them to your needs
+
+## ## Start Default Options ##
+## default kernel options
+# kopt=root=#ROOT_PARTITION# ro
+
+## default grub root device
+## e.g. groot=(hd0,0)
+# groot=#GROOT#
+
+## should update-grub create alternative boot options
+## e.g. alternative=true
+##      alternative=false
+# alternative=true
+
+## should update-grub lock alternative boot options
+## e.g. lockalternative=true
+##      lockalternative=false
+# lockalternative=true
+
+## altoption boot targets option
+## multiple altoptions lines are allowed
+## e.g. altoptions=(extra menu suffix) extra boot options
+##      altoptions=(recovery mode) single
+# altoptions=(recovery mode) single
+
+## add memtest86 if found
+# memtest86=true
+
+## ## End Default Options ##
+
+### END DEBIAN AUTOMAGIC KERNELS LIST
+
+

Deleted: trunk/examples/simple/files/boot/grub/menu.lst/GRUB
===================================================================
--- trunk/examples/simple/files/boot/grub/menu.lst/GRUB	2010-08-02 03:58:20 UTC (rev 5934)
+++ trunk/examples/simple/files/boot/grub/menu.lst/GRUB	2010-08-03 00:32:42 UTC (rev 5935)
@@ -1,43 +0,0 @@
-#
-timeout 5
-default 0
-color cyan/blue white/blue
-
-### BEGIN AUTOMAGIC KERNELS LIST
-## lines between the AUTOMAGIC KERNELS LIST markers will be modified
-## by the debian update-grub script except for the default optons below
-
-## DO NOT UNCOMMENT THEM, Just edit them to your needs
-
-## ## Start Default Options ##
-## default kernel options
-# kopt=root=#ROOT_PARTITION# ro 
-
-## default grub root device
-## e.g. groot=(hd0,0)
-# groot=#GROOT#
-
-## should update-grub create alternative boot options
-## e.g. alternative=true
-##      alternative=false
-# alternative=true
-
-## should update-grub lock alternative boot options
-## e.g. lockalternative=true
-##      lockalternative=false
-# lockalternative=true
-
-## altoption boot targets option
-## multiple altoptions lines are allowed
-## e.g. altoptions=(extra menu suffix) extra boot options
-##      altoptions=(recovery mode) single
-# altoptions=(recovery mode) single
-
-## add memtest86 if found
-# memtest86=true
-
-## ## End Default Options ##
-
-### END DEBIAN AUTOMAGIC KERNELS LIST
-
-

Added: trunk/examples/simple/files/etc/kernel-img.conf/DEBIAN
===================================================================
--- trunk/examples/simple/files/etc/kernel-img.conf/DEBIAN	                        (rev 0)
+++ trunk/examples/simple/files/etc/kernel-img.conf/DEBIAN	2010-08-03 00:32:42 UTC (rev 5935)
@@ -0,0 +1,5 @@
+do_symlinks = Yes
+do_initrd = Yes
+silent_modules=yes
+clobber_modules=yes
+do_boot_enable=no

Deleted: trunk/examples/simple/files/etc/kernel-img.conf/DEFAULT
===================================================================
--- trunk/examples/simple/files/etc/kernel-img.conf/DEFAULT	2010-08-02 03:58:20 UTC (rev 5934)
+++ trunk/examples/simple/files/etc/kernel-img.conf/DEFAULT	2010-08-03 00:32:42 UTC (rev 5935)
@@ -1,5 +0,0 @@
-do_symlinks = Yes
-do_initrd = Yes
-silent_modules=yes
-clobber_modules=yes
-do_boot_enable=no

Added: trunk/examples/simple/hooks/instsoft.DEBIAN
===================================================================
--- trunk/examples/simple/hooks/instsoft.DEBIAN	                        (rev 0)
+++ trunk/examples/simple/hooks/instsoft.DEBIAN	2010-08-03 00:32:42 UTC (rev 5935)
@@ -0,0 +1,3 @@
+#! /bin/bash
+
+[ -s $target/etc/kernel-img.conf ] || fcopy -Bi /etc/kernel-img.conf

Deleted: trunk/examples/simple/hooks/instsoft.FAIBASE
===================================================================
--- trunk/examples/simple/hooks/instsoft.FAIBASE	2010-08-02 03:58:20 UTC (rev 5934)
+++ trunk/examples/simple/hooks/instsoft.FAIBASE	2010-08-03 00:32:42 UTC (rev 5935)
@@ -1,3 +0,0 @@
-#! /bin/bash
-
-[ -s $target/etc/kernel-img.conf ] || fcopy -Bi /etc/kernel-img.conf

Added: trunk/examples/simple/package_config/DEBIAN
===================================================================
--- trunk/examples/simple/package_config/DEBIAN	                        (rev 0)
+++ trunk/examples/simple/package_config/DEBIAN	2010-08-03 00:32:42 UTC (rev 5935)
@@ -0,0 +1,26 @@
+PACKAGES aptitude I386
+linux-image-486
+memtest86+
+
+PACKAGES aptitude CHROOT
+linux-image-486-
+linux-image-amd64-
+
+PACKAGES aptitude AMD64
+linux-image-amd64
+memtest86+
+
+PACKAGES aptitude XEN
+xen-linux-system-2.6.26-2-xen-amd64
+
+PACKAGES aptitude DHCPC
+dhcp3-client
+
+PACKAGES aptitude GRUB
+grub lilo-
+
+PACKAGES aptitude GRUB_PC
+grub-pc grub- lilo-
+
+PACKAGES aptitude LILO
+lilo grub-

Deleted: trunk/examples/simple/package_config/DEFAULT
===================================================================
--- trunk/examples/simple/package_config/DEFAULT	2010-08-02 03:58:20 UTC (rev 5934)
+++ trunk/examples/simple/package_config/DEFAULT	2010-08-03 00:32:42 UTC (rev 5935)
@@ -1,26 +0,0 @@
-PACKAGES aptitude I386
-linux-image-486
-memtest86+
-
-PACKAGES aptitude CHROOT
-linux-image-486-
-linux-image-amd64-
-
-PACKAGES aptitude AMD64
-linux-image-amd64
-memtest86+
-
-PACKAGES aptitude XEN
-xen-linux-system-2.6.26-2-xen-amd64
-
-PACKAGES aptitude DHCPC
-dhcp3-client
-
-PACKAGES aptitude GRUB
-grub lilo-
-
-PACKAGES aptitude GRUB_PC
-grub-pc grub- lilo-
-
-PACKAGES aptitude LILO
-lilo grub-

Modified: trunk/examples/simple/package_config/FAIBASE
===================================================================
--- trunk/examples/simple/package_config/FAIBASE	2010-08-02 03:58:20 UTC (rev 5934)
+++ trunk/examples/simple/package_config/FAIBASE	2010-08-03 00:32:42 UTC (rev 5935)
@@ -1,4 +1,4 @@
-PACKAGES aptitude
+PACKAGES aptitude DEBIAN
 fai-client
 cfengine2
 cron

Added: trunk/examples/simple/scripts/DEBIAN/10-keymap
===================================================================
--- trunk/examples/simple/scripts/DEBIAN/10-keymap	                        (rev 0)
+++ trunk/examples/simple/scripts/DEBIAN/10-keymap	2010-08-03 00:32:42 UTC (rev 5935)
@@ -0,0 +1,14 @@
+#! /bin/bash
+
+# (c) Thomas Lange, 2001-2008, lange at debian.org
+# (c) Michael Goetze, 2010, mgoetze at mgoetze.net
+
+error=0 ; trap "error=$((error|1))" ERR
+
+# create keyboard layout table
+$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
+

Added: trunk/examples/simple/scripts/DEBIAN/10-rootpw
===================================================================
--- trunk/examples/simple/scripts/DEBIAN/10-rootpw	                        (rev 0)
+++ trunk/examples/simple/scripts/DEBIAN/10-rootpw	2010-08-03 00:32:42 UTC (rev 5935)
@@ -0,0 +1,12 @@
+#! /bin/bash
+
+# (c) Thomas Lange, 2001-2008, lange at debian.org
+# (c) Michael Goetze, 2010, mgoetze at mgoetze.net
+
+error=0 ; trap "error=$((error|1))" ERR
+
+# set root password
+$ROOTCMD usermod -p $ROOTPW root
+
+exit $error
+

Added: trunk/examples/simple/scripts/DEBIAN/30-interface
===================================================================
--- trunk/examples/simple/scripts/DEBIAN/30-interface	                        (rev 0)
+++ trunk/examples/simple/scripts/DEBIAN/30-interface	2010-08-03 00:32:42 UTC (rev 5935)
@@ -0,0 +1,33 @@
+#! /bin/bash
+
+error=0 ; trap "error=$((error|1))" ERR
+
+if ifclass DHCPC && [ $FAI_ACTION != "softupdate" ]
+then
+    cat > $target/etc/network/interfaces <<-EOF
+	# generated by FAI
+	auto lo eth0
+	iface lo inet loopback
+	iface eth0 inet dhcp
+EOF
+else
+      [ -n "$IPADDR" ] && cat > $target/etc/network/interfaces <<-EOF
+	# generated by FAI
+	auto lo eth0
+	iface lo inet loopback
+	iface eth0 inet static
+	  address $IPADDR
+	  netmask $NETMASK
+	  broadcast $BROADCAST
+	  gateway $GATEWAYS
+EOF
+    [ -n "$NETWORK" ] && echo "localnet $NETWORK" > $target/etc/networks
+    [ -s /etc/resolv.conf ] && cp -p /etc/resolv.conf $target/etc
+fi
+
+# here fcopy is mostly used, when installing a client for running in a
+# different subnet than during the installation
+fcopy -i /etc/resolv.conf
+fcopy -iM /etc/network/interfaces /etc/networks
+
+exit $error

Added: trunk/examples/simple/scripts/DEBIAN/40-misc
===================================================================
--- trunk/examples/simple/scripts/DEBIAN/40-misc	                        (rev 0)
+++ trunk/examples/simple/scripts/DEBIAN/40-misc	2010-08-03 00:32:42 UTC (rev 5935)
@@ -0,0 +1,12 @@
+#! /bin/bash
+
+error=0 ; trap "error=$((error|1))" ERR
+
+chmod -c 1777 ${target}/tmp
+chown -c 0:0  ${target}/tmp
+
+ainsl -av ${target}/etc/mailname ${HOSTNAME}
+sed -i -e "s/^UTC.*/UTC=${UTC}/" $target/etc/default/rcS
+sed -i -e 's#/sbin/getty 38400#/sbin/getty -f /etc/issue.linuxlogo 38400#' ${target}/etc/inittab
+
+exit $error

Modified: trunk/examples/simple/scripts/FAIBASE/10-misc
===================================================================
--- trunk/examples/simple/scripts/FAIBASE/10-misc	2010-08-02 03:58:20 UTC (rev 5934)
+++ trunk/examples/simple/scripts/FAIBASE/10-misc	2010-08-03 00:32:42 UTC (rev 5935)
@@ -1,6 +1,7 @@
 #! /bin/bash
 
 # (c) Thomas Lange, 2001-2008, lange at debian.org
+# (c) Michael Goetze, 2010, mgoetze at mgoetze.net
 
 error=0 ; trap "error=$((error|1))" ERR
 
@@ -20,18 +21,10 @@
 
 fcopy -iM /etc/hosts /etc/motd
 
-# set root password
-#echo "root:$ROOTPW" | $ROOTCMD chpasswd --encrypted
-$ROOTCMD usermod -p "$ROOTPW" root
 # make /root accessible only by root
 chmod 0700 $target/root
 chown root:root $target/root
 # copy default dotfiles for root account
 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
-# dumpkeys | gzip -9f >$target/etc/console/boottime.kmap.gz
-
 exit $error

Deleted: trunk/examples/simple/scripts/FAIBASE/30-interface
===================================================================
--- trunk/examples/simple/scripts/FAIBASE/30-interface	2010-08-02 03:58:20 UTC (rev 5934)
+++ trunk/examples/simple/scripts/FAIBASE/30-interface	2010-08-03 00:32:42 UTC (rev 5935)
@@ -1,33 +0,0 @@
-#! /bin/bash
-
-error=0 ; trap "error=$((error|1))" ERR
-
-if ifclass DHCPC && [ $FAI_ACTION != "softupdate" ]
-then
-    cat > $target/etc/network/interfaces <<-EOF
-	# generated by FAI
-	auto lo eth0
-	iface lo inet loopback
-	iface eth0 inet dhcp
-EOF
-else
-      [ -n "$IPADDR" ] && cat > $target/etc/network/interfaces <<-EOF
-	# generated by FAI
-	auto lo eth0
-	iface lo inet loopback
-	iface eth0 inet static
-	  address $IPADDR
-	  netmask $NETMASK
-	  broadcast $BROADCAST
-	  gateway $GATEWAYS
-EOF
-    [ -n "$NETWORK" ] && echo "localnet $NETWORK" > $target/etc/networks
-    [ -s /etc/resolv.conf ] && cp -p /etc/resolv.conf $target/etc
-fi
-
-# here fcopy is mostly used, when installing a client for running in a
-# different subnet than during the installation  
-fcopy -i /etc/resolv.conf
-fcopy -iM /etc/network/interfaces /etc/networks
-
-exit $error




More information about the Fai-commit mailing list