X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=grml-live;h=28c3e842d6f52de148560ca2676e058323ebac77;hp=2c4d4a26ce8687ff5c3d18d4c55b859a4546fcab;hb=8136c87214c11d1edc88029c40b8611fc7491f72;hpb=66739037e14da89f1805d9c6f4e7f2b1fed59cf8 diff --git a/grml-live b/grml-live index 2c4d4a2..28c3e84 100755 --- 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 # }}} @@ -152,6 +152,7 @@ umount_all() { # make sure we don't leave any mounts - FAI doesn't remove them always umount $CHROOT_OUTPUT/proc/sys/fs/binfmt_misc 2>/dev/null || /bin/true umount $CHROOT_OUTPUT/proc 2>/dev/null || /bin/true + umount $CHROOT_OUTPUT/run 2>/dev/null || /bin/true umount $CHROOT_OUTPUT/sys 2>/dev/null || /bin/true umount $CHROOT_OUTPUT/dev/pts 2>/dev/null || /bin/true umount $CHROOT_OUTPUT/dev 2>/dev/null || /bin/true @@ -291,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 ;; @@ -303,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 ;; @@ -366,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' @@ -902,6 +904,7 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then cp -a "${CHROOT_OUTPUT}"/usr/lib/grub/*-pc/*.lst "${BUILD_OUTPUT}"/boot/grub/ cp -a "${CHROOT_OUTPUT}"/usr/share/grub/ascii.pf2 "${BUILD_OUTPUT}"/boot/grub/ cp -a "${CHROOT_OUTPUT}"/boot/grub/core.img "${BUILD_OUTPUT}"/boot/grub/ + cp -a "${CHROOT_OUTPUT}"/boot/grub/grub.img "${BUILD_OUTPUT}"/boot/grub/ if ! [ -d "${TEMPLATE_DIRECTORY}"/GRML ] ; then log "Error: ${TEMPLATE_DIRECTORY}/GRML does not exist. Exiting." @@ -1387,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