Use metapackages for kernel
[grml-live.git] / grml-live
index fb4115a..28c3e84 100755 (executable)
--- a/grml-live
+++ b/grml-live
@@ -81,13 +81,13 @@ More details: man grml-live + /usr/share/doc/grml-live/grml-live.html
 
 Please send your bug reports and feedback to the grml-team: http://grml.org/bugs/
 "
+   [ "$(id -u 2>/dev/null)" != 0 ] && echo "Please notice that this script requires root permissions."
 }
 
 # make sure it's possible to get usage information without being
 # root or actually executing the script
 if [ "$1" = '-h' -o "$1" = '--help' ] ; then
    usage
-   [ "$(id -u 2>/dev/null)" != 0 ] && echo "Please notice that this script requires root permissions."
    exit 0
 fi
 # }}}
@@ -292,7 +292,7 @@ copy_addon_file() {
 # }}}
 
 # command line parsing {{{
-while getopts "a:C:c:d:D:e:g:i:I:o:r:s:t:U:v:AbBFnNqQuVz" opt; do
+while getopts "a:C:c:d:D:e:g:i:I:o:r:s:t:U:v:AbBFhnNqQuVz" opt; do
   case "$opt" in
     a) ARCH="$OPTARG" ;;
     A) CLEAN_ARTIFACTS=1 ;;
@@ -304,6 +304,7 @@ while getopts "a:C:c:d:D:e:g:i:I:o:r:s:t:U:v:AbBFnNqQuVz" opt; do
     D) GRML_FAI_CONFIG="$(readlink -f $OPTARG)" ;;
     e) EXTRACT_ISO_NAME="$(readlink -f $OPTARG)" ;;
     g) GRML_NAME="$OPTARG" ;;
+    h) usage ; bailout 0 ;;
     i) ISO_NAME="$OPTARG" ;;
     I) CHROOT_INSTALL="$OPTARG" ;;
     n) SKIP_MKISOFS=1 ;;
@@ -367,7 +368,7 @@ fi
 [ -n "$NFSROOT_CONF" ]            || NFSROOT_CONF="${GRML_FAI_CONFIG}/make-fai-nfsroot.conf"
 [ -n "$RELEASENAME" ]             || RELEASENAME='grml-live rocks'
 [ -n "$SQUASHFS_EXCLUDES_FILE" ]  || SQUASHFS_EXCLUDES_FILE="${GRML_FAI_CONFIG}/config/grml/squashfs-excludes"
-[ -n "$SUITE" ]                   || SUITE='squeeze'
+[ -n "$SUITE" ]                   || SUITE='testing'
 [ -n "$TEMPLATE_DIRECTORY" ]      || TEMPLATE_DIRECTORY='/usr/share/grml-live/templates'
 [ -n "$USERNAME" ]                || USERNAME='grml'
 [ -n "$VERSION" ]                 || VERSION='0.0.1'
@@ -1389,7 +1390,10 @@ create_netbootpackage() {
   fi
 
   if tar -C "$OUTPUTDIR" -jcf "${OUTPUT_FILE}" "grml_netboot_package_${GRML_NAME}_${VERSION}" ; then
-    sha1sum "${OUTPUT_FILE}" > "${OUTPUT_FILE}.sha1"
+    (
+      cd $(dirname "${OUTPUT_FILE}")
+      sha1sum $(basename "${OUTPUT_FILE}") > "${OUTPUT_FILE}.sha1"
+    )
     einfo "Generated netboot package ${OUTPUT_FILE}" ; eend 0
     rm -rf "${OUTPUTDIR}"
   else