Fall back to blackhole.pca.dfn.de; Improve check for kernel version; Work around...
authorMichael Prokop <devnull@localhost>
Thu, 18 Oct 2007 12:30:38 +0000 (14:30 +0200)
committerMichael Prokop <devnull@localhost>
Thu, 18 Oct 2007 12:30:38 +0000 (14:30 +0200)
debian/changelog
etc/grml/fai/config/hooks/instsoft.GRMLBASE
etc/grml/fai/config/scripts/GRMLBASE/10-build-initramfs
etc/grml/fai/config/scripts/GRMLBASE/21-usersetup
etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot

index 8ac80a6..d2a2150 100644 (file)
@@ -9,6 +9,12 @@ grml-live (0.0.6) unstable; urgency=low
     to track.
   * Update of buildd scripts: main configuration file main.sh
     which provides all the build stuff inside separate functions.
+  * Fall back to blackhole.pca.dfn.de as keyserver if retreiving
+    from subkeys.pgp.net fails.
+  * Improve check for kernel version inside
+    /etc/grml/fai/config/scripts/GRMLBASE/10-build-initramfs
+  * Work around #353967 for Debian/etch in
+    /etc/grml/fai/config/scripts/GRMLBASE/21-usersetup
 
  -- Michael Prokop <mika@grml.org>  Wed, 17 Oct 2007 22:59:08 +0200
 
index 441c632..f3cf9ec 100755 (executable)
@@ -4,7 +4,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2 or any later version.
-# Latest change: Mon Oct 15 19:29:19 CEST 2007 [mika]
+# Latest change: Thu Oct 18 14:18:44 CEST 2007 [mika]
 ################################################################################
 
 set -u
@@ -15,7 +15,8 @@ set -e
 echo "Acquire::http::Pipeline-Depth "0"; // added by grml-live" >> $target/etc/apt/apt.conf
 
 # install grml keys:
-gpg --keyserver subkeys.pgp.net --recv-keys F61E2E7CECDEA787
+gpg --keyserver subkeys.pgp.net      --recv-keys F61E2E7CECDEA787 || \
+gpg --keyserver blackhole.pca.dfn.de --recv-keys F61E2E7CECDEA787
 gpg --export F61E2E7CECDEA787 > $target/etc/apt/grml.key
 $ROOTCMD apt-key add /etc/apt/grml.key
 
index 67b2b8d..923b754 100755 (executable)
@@ -4,16 +4,15 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2 or any later version.
-# Latest change: Sat Oct 06 16:47:50 CEST 2007 [mika]
+# Latest change: Thu Oct 18 14:02:50 CEST 2007 [mika]
 ################################################################################
 
-set -u
 set -e
 
 cp /etc/grml/fai/live-initramfs/live.conf $target/etc/live.conf
 cp /etc/grml/fai/live-initramfs/grml-script.init-top "$target/usr/share/initramfs-tools/scripts/init-top/grml"
 
-FILE=$(ls -1 $target/boot/vmlinuz-* | sort -r | head -1)
+FILE=$(ls -1 $target/boot/vmlinuz-* 2>/dev/null| sort -r | head -1)
 KERNELVERSION=$(echo "${FILE##$target/boot/vmlinuz-}")
 
 # make sure mdadm isn't executed in initrd:
@@ -22,7 +21,12 @@ KERNELVERSION=$(echo "${FILE##$target/boot/vmlinuz-}")
 #   sed -i "s/INITRDSTART=.*/INITRDSTART=none/"    "$target"/etc/default/mdadm
 #fi
 
-$ROOTCMD update-initramfs -c -t -k $KERNELVERSION
+if [ -z "$KERNELVERSION" ] ; then
+   echo "Error: No kernel found, can not create initramfs. Exiting.">&2
+   exit 1
+else
+   $ROOTCMD update-initramfs -c -t -k $KERNELVERSION
+fi
 
 ## END OF FILE #################################################################
 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3
index 55c09cc..8686b87 100755 (executable)
@@ -4,7 +4,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2 or any later version.
-# Latest change: Wed Sep 19 20:27:03 CEST 2007 [mika]
+# Latest change: Thu Oct 18 14:28:53 CEST 2007 [mika]
 ################################################################################
 
 set -u
@@ -17,6 +17,16 @@ USERNAME=''
 if grep -q "$USERNAME:x:1000" $target/etc/group ; then
    echo "group $USERNAME exists already, skipping"
 else
+  if grep -q 'gsmsms:x:1000' $target/etc/group ; then
+     echo 'Bug #353967 detected, fixing GUID = 1000 setup for you'
+     $ROOTCMD delgroup gsmsms
+     $ROOTCMD deluser gsmsms
+     $ROOTCMD addgroup --gid 1000 $USERNAME
+     $ROOTCMD addgroup --system gsmsms
+     $ROOTCMD adduser --system --ingroup gsmsms \
+                      --no-create-home --home /var/spool/sms gsmsms
+     $ROOTCMD adduser gsmsms dialout
+  fi
   $ROOTCMD addgroup --gid 1000 $USERNAME
 fi
 
index 5e00eee..7642950 100755 (executable)
@@ -12,28 +12,30 @@ set -e
 # remove some big directories when using class LATEX_CLEANUP:
 if ifclass LATEX_CLEANUP ; then
    cp /etc/grml/fai/grml/grml_cleanup_chroot.latex_cleanup $target/root/
-   $ROOTCMD /root/grml_cleanup_chroot.latex_cleanup
+   $ROOTCMD  /root/grml_cleanup_chroot.latex_cleanup
    rm $target/root/grml_cleanup_chroot.latex_cleanup
 fi
 
 # skip tasks which require only when using class NO_ONLINE:
 if ! ifclass NO_ONLINE ; then
    cp /etc/grml/fai/grml/grml_cleanup_chroot.no_online $target/root/
-   $ROOTCMD /root/grml_cleanup_chroot.no_online
+   $ROOTCMD  /root/grml_cleanup_chroot.no_online
    rm $target/root/grml_cleanup_chroot.no_online
 fi
 
 # remove /usr/share/doc, /usr/share/info,... only in class REMOVE_DOCS:
 if ifclass REMOVE_DOCS ; then
    cp /etc/grml/fai/grml/grml_cleanup_chroot.remove_docs $target/root/
-   $ROOTCMD /root/grml_cleanup_chroot.remove_docs
+   $ROOTCMD  /root/grml_cleanup_chroot.remove_docs
    rm $target/root/grml_cleanup_chroot.remove_docs
 fi
 
 # misc cleanup:
-cp /etc/grml/fai/grml/grml_cleanup_chroot $target/root/
-$ROOTCMD /root/grml_cleanup_chroot
-rm $target/root/grml_cleanup_chroot
+if [ -f /etc/grml/fai/grml/grml_cleanup_chroot ] ; then
+   cp /etc/grml/fai/grml/grml_cleanup_chroot $target/root/
+   $ROOTCMD  /root/grml_cleanup_chroot
+   rm $target/root/grml_cleanup_chroot
+fi
 
 # make sure GRML_SMALL uses the appropriate configuration:
 if ifclass GRML_SMALL ; then