X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=grml-live;h=f9ddd191965ac029e887c3a78b20e85f9b821e7b;hb=d05d500c0caa81319658f0b23a3c5c877baf7e7f;hp=477bdeda1ab62a837e8baa85890b758f894b47d9;hpb=3423b966683d3e8317ca84d0763576745bffa4b5;p=grml-live-grml.git diff --git a/grml-live b/grml-live index 477bded..f9ddd19 100755 --- a/grml-live +++ b/grml-live @@ -353,12 +353,17 @@ fi # does this suck? YES! if [ -n "$SUITE" ] ; then + # /usr/share/debootstrap/scripts/unstable does not exist, instead use 'sid': + case $SUITE in + unstable) SUITE='sid' ;; + esac + DIST=" etch\| stable\| lenny\| squeeze\| testing\| sid\| unstable" - sed "s/\(deb .\+\)\([ \t]*\) $DIST\([ \t]*\)\(main \)/\1\2 $SUITE \3\4/" /etc/grml/fai/apt/sources.list | sponge /etc/grml/fai/apt/sources.list + sed "s/\(^deb .\+\)\([ \t]*\)\($DIST\)\([ \t]*\)\(main \)/\1 \2$SUITE \4\5/" /etc/grml/fai/apt/sources.list | sponge /etc/grml/fai/apt/sources.list for file in "$LIVE_CONF" "$CONFIG" "$LOCAL_CONFIG" ; do if [ -n "$file" ] ; then - sed "s/SUITE=.*/SUITE=\"$SUITE\"/" $LIVE_CONF | sponge $LIVE_CONF - sed "s/\(deb .\+\)\([ \t]*\) $DIST\([ \t]*\)\(main \)/\1\2 $SUITE \3\4/" "$file" | sponge "$file" + sed "s/^SUITE=.*/SUITE=\"$SUITE\"/" $file | sponge $file + sed "s/\(^deb .\+\)\([ \t]*\)\($DIST\)\([ \t]*\)\(main \)/\1 \2$SUITE \4\5/""$file" | sponge "$file" fi done @@ -374,11 +379,11 @@ if [ -n "$SUITE" ] ; then for file in "$LIVE_CONF" "$CONFIG" "$LOCAL_CONFIG" ; do if [ -n "$file" ] ; then - sed "s|FAI_DEBOOTSTRAP=\"[a-z]* |FAI_DEBOOTSTRAP=\"$SUITE |" "$file" | sponge "$file" + sed "s|^FAI_DEBOOTSTRAP=\"[a-z]* |FAI_DEBOOTSTRAP=\"$SUITE |" "$file" | sponge "$file" fi done - sed "s|FAI_DEBOOTSTRAP=\"[a-z]* |FAI_DEBOOTSTRAP=\"$SUITE |" "$NFSROOT_CONF" | sponge "$NFSROOT_CONF" + sed "s|^FAI_DEBOOTSTRAP=\"[a-z]* |FAI_DEBOOTSTRAP=\"$SUITE |" "$NFSROOT_CONF" | sponge "$NFSROOT_CONF" fi # set $ARCH @@ -386,7 +391,7 @@ fi if grep -q -- 'FAI_DEBOOTSTRAP_OPTS.*--arch' "$NFSROOT_CONF" ; then sed "s/--arch [a-z0-9]* /--arch $ARCH /" "$NFSROOT_CONF" | sponge "$NFSROOT_CONF" else - sed "s|FAI_DEBOOTSTRAP_OPTS=\"\(.*\)|FAI_DEBOOTSTRAP_OPTS=\"--arch $ARCH \1|" "$NFSROOT_CONF" | sponge "$NFSROOT_CONF" + sed "s|^FAI_DEBOOTSTRAP_OPTS=\"\(.*\)|FAI_DEBOOTSTRAP_OPTS=\"--arch $ARCH \1|" "$NFSROOT_CONF" | sponge "$NFSROOT_CONF" fi # }}} @@ -536,7 +541,14 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then cp ${TEMPLATE_DIRECTORY}/boot/isolinux/* "$BUILD_OUTPUT"/boot/isolinux/ if [ -z "$NO_ADDONS" ] ; then - cp ${TEMPLATE_DIRECTORY}/boot/addons/* "$BUILD_OUTPUT"/boot/addons/ + # copy only files so we can handle bsd4grml on its own + for file in ${TEMPLATE_DIRECTORY}/boot/addons/* ; do + test -f $file && cp $file "$BUILD_OUTPUT"/boot/addons/ + done + + if [ -z "$NO_ADDONS_BSD4GRML" ] ; then + cp -a ${TEMPLATE_DIRECTORY}/boot/addons/bsd4grml "$BUILD_OUTPUT"/boot/addons/ + fi fi if ! [ -d "${BUILD_OUTPUT}/boot/grub" ] ; then @@ -617,9 +629,9 @@ fi if [ -f "$BUILD_OUTPUT"/live/${GRML_NAME}.squashfs -a -z "$UPDATE" -a -z "$BUILD_ONLY" -a -z "$BUILD_DIRTY" ] ; then log "$BUILD_OUTPUT/live exists already, skipping stage 'squashfs'" ewarn "$BUILD_OUTPUT/live exists already, skipping stage 'squashfs'" ; eend 0 -elif [ -f "$BUILD_OUTPUT"/live/${GRML_NAME}.squashfs -a -n "$SKIP_MKSQUASHFS" ] ; then - log "$BUILD_OUTPUT/live exists already, skipping stage 'squashfs' as requested" - ewarn "$BUILD_OUTPUT/live exists already, skipping stage 'squashfs' as requested" ; eend 0 +elif [ -n "$SKIP_MKSQUASHFS" ] ; then + log "Skipping stage 'squashfs' as requested via option -q" + ewarn "Skipping stage 'squashfs' as requested via option -q" ; eend 0 else [ -d "$BUILD_OUTPUT"/live ] || mkdir "$BUILD_OUTPUT"/live # make sure we don't leave (even an empty) base.tgz: