console_baud=""
console_spec=""
console_serial_line=""
+kernel_args=""
#################### compute all supported types
. /etc/planetlab/plc_config
fi
- # From within a myplc chroot /usr/tmp is too small
- # to build all possible images, whereas /data is part of the host
- # filesystem and usually has sufficient space. What we
- # should do is check whether the expected amount of space
- # is available.
- BUILDTMP=/usr/tmp
- if [ -d /data/tmp ] ; then
- isreadonly=$(mktemp /data/tmp/isreadonly.XXXXXX || /bin/true)
- if [ -n "$isreadonly" ] ; then
- rm -f "$isreadonly"
- BUILDTMP=/data/tmp
- fi
- fi
+ # use /var/tmp that should be large enough on both chroot- or vserver-based myplc
+ BUILDTMP=/var/tmp
FULL_VERSION_STRING="${PLC_NAME} BootCD ${BOOTCD_VERSION}"
O) OUTPUT_BASE="$OPTARG" ;;
o) OUTPUT_NAME="$OPTARG" ;;
C) CUSTOM_DIR="$OPTARG" ;;
- k) KARGS_STR="$OPTARG" ;;
+ k) KARGS_STR="$KARGS_STR $OPTARG" ;;
n) DRY_RUN=true ;;
h|*) usage ;;
esac
if [ -n "$KARGS_STR" ] ; then
echo "$KARGS_STR" > $OVERLAY/kargs.txt
+ kernel_args=$KARGS_STR
fi
# Pack overlay files into a compressed archive
cat >$ISOFS/isolinux.cfg <<EOF
${console_serial_line}
DEFAULT kernel
-APPEND ramdisk_size=$ramdisk_size initrd=bootcd.img,overlay.img${custom:+,custom.img} root=/dev/ram0 rw ${console_spec}
+APPEND ramdisk_size=$ramdisk_size initrd=bootcd.img,overlay.img${custom:+,custom.img} root=/dev/ram0 rw ${kernel_args}
DISPLAY pl_version
PROMPT 0
TIMEOUT 40
# Create ISO image
echo "* Creating ISO image"
- mkisofs -o "$iso" \
- $MKISOFS_OPTS \
- $ISOFS
+ mkisofs -o "$iso" $MKISOFS_OPTS $ISOFS
}
#################### USB with partitions
cat >$tmp <<EOF
${console_serial_line}
DEFAULT kernel
-APPEND ramdisk_size=$ramdisk_size initrd=bootcd.img,overlay.img${custom:+,custom.img} root=/dev/ram0 rw ${console_spec}
+APPEND ramdisk_size=$ramdisk_size initrd=bootcd.img,overlay.img${custom:+,custom.img} root=/dev/ram0 rw ${kernel_args}
DISPLAY pl_version
PROMPT 0
TIMEOUT 40
cat >$tmp <<EOF
${console_serial_line}
DEFAULT kernel
-APPEND ramdisk_size=$ramdisk_size initrd=bootcd.img,overlay.img${custom:+,custom.img} root=/dev/ram0 rw ${console_spec}
+APPEND ramdisk_size=$ramdisk_size initrd=bootcd.img,overlay.img${custom:+,custom.img} root=/dev/ram0 rw ${kernel_args}
DISPLAY pl_version
PROMPT 0
TIMEOUT 40
cat >$tmp/isolinux.cfg <<EOF
${console_serial_line}
DEFAULT kernel
-APPEND ramdisk_size=$cramfs_size initrd=cramfs.img root=/dev/ram0 ro ${console_spec}
+APPEND ramdisk_size=$cramfs_size initrd=cramfs.img root=/dev/ram0 ro ${kernel_args}
DISPLAY pl_version
PROMPT 0
TIMEOUT 40
cat >$tmp <<EOF
${console_serial_line}
DEFAULT kernel
-APPEND ramdisk_size=$cramfs_size initrd=cramfs.img root=/dev/ram0 ro ${console_spec}
+APPEND ramdisk_size=$cramfs_size initrd=cramfs.img root=/dev/ram0 ro ${kernel_args}
DISPLAY pl_version
PROMPT 0
TIMEOUT 40