about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--mklive.sh.in39
1 files changed, 14 insertions, 25 deletions
diff --git a/mklive.sh.in b/mklive.sh.in
index 5221040..8fbc828 100644
--- a/mklive.sh.in
+++ b/mklive.sh.in
@@ -32,10 +32,6 @@ info_msg() {
 mount_pseudofs() {
 	local fs
 
-	if [ -n "$ROOTDIR" ]; then
-		mount --bind "$ROOTDIR" "$ROOTFS" || error_out $?
-	fi
-
 	for fs in sys proc dev; do
 		if [ ! -d "$ROOTFS/$fs" ]; then
 			mkdir -p "$ROOTFS/$fs"
@@ -50,9 +46,6 @@ umount_pseudofs() {
 	for fs in sys proc dev; do
 		umount -f "$ROOTFS/$fs" >/dev/null 2>&1
 	done
-	if [ -n "$1" -a -n "$ROOTDIR" ]; then
-		umount -f "$ROOTFS" >/dev/null 2>&1
-	fi
 }
 
 error_out() {
@@ -177,7 +170,6 @@ Options:
  -c (gzip|bzip2|xz) 	Compression type for the squashfs/initramfs image.
  -k version		Kernel version to use.
  -o outfile		Output file name for the ISO image.
- -r rootdir		Rootfs directory.
  -s splash		Splash image file for isolinux.
  -v volname		ISO Volume name.
 _EOF
@@ -187,13 +179,12 @@ _EOF
 #
 # main()
 #
-while getopts "C:c:k:o:r:s:v:h" opt; do
+while getopts "C:c:k:o:s:v:h" opt; do
 	case $opt in
 	C) CONFIG_FILE="$OPTARG";;
 	c) COMPRESSTYPE="$OPTARG";;
 	k) KERNELVERSION="$OPTARG";;
 	o) OUTPUT_FILE="$OPTARG";;
-	r) ROOTDIR="$OPTARG";;
 	s) SPLASH_IMAGE="$OPTARG";;
 	v) ISO_VOLUME="$OPTARG";;
 	h) usage;;
@@ -292,25 +283,23 @@ case $XBPS_VERSION in
 	[0-9].[1-9][6-9]*) XBPS_016=1;;
 esac
 
-info_msg "Redirecting stdout/stderr to $LOGFILE..."
+info_msg "Redirecting stdout/stderr to $LOGFILE ..."
 info_msg "[1/9] Installing packages into the rootfs..."
 for f in ${PACKAGE_LIST}; do
 	info_msg "  $f"
 done
-if [ -z "$ROOTDIR" ]; then
-	# Check that all pkgs are reachable.
-	${XBPS_BIN_CMD} ${XBPS_ARGS} -n install ${PACKAGE_LIST} >>$LOGFILE 2>&1
-	if [ $? -ne 0 ]; then
-		info_msg "Missing required binary packages, exiting..."
-		error_out
-	fi
-	${XBPS_BIN_CMD} ${XBPS_ARGS} install ${PACKAGE_LIST} \
-		2>&1|cat >> $LOGFILE || error_out
-	${XBPS_BIN_CMD} ${XBPS_ARGS} autoupdate \
-		2>&1|cat >> $LOGFILE || error_out
-	${XBPS_BIN_CMD} ${XBPS_ARGS} autoremove \
-		2>&1|cat >> $LOGFILE || error_out
+# Check that all pkgs are reachable.
+${XBPS_BIN_CMD} ${XBPS_ARGS} -n install ${PACKAGE_LIST} >>$LOGFILE 2>&1
+if [ $? -ne 0 ]; then
+	info_msg "Missing required binary packages, exiting..."
+	error_out
 fi
+${XBPS_BIN_CMD} ${XBPS_ARGS} install ${PACKAGE_LIST} \
+	2>&1|cat >> $LOGFILE || error_out
+${XBPS_BIN_CMD} ${XBPS_ARGS} autoupdate \
+	2>&1|cat >> $LOGFILE || error_out
+${XBPS_BIN_CMD} ${XBPS_ARGS} autoremove \
+	2>&1|cat >> $LOGFILE || error_out
 
 ${XBPS_BIN_CMD} -r "$ROOTFS" list > \
 	"${OUTPUT_FILE%.iso}"-package-list.txt || error_out
@@ -339,7 +328,7 @@ cp -a /lib/modules/${KERNELVERSION} "$ROOTFS/lib/modules" || error_out $?
 
 # Generate a sane xbps.conf for the rootfs.
 rm -f $ROOTFS/etc/xbps/xbps.conf
-echo "# xbps.conf generated by vmklive-0.8.5" \
+echo "# xbps.conf generated by void-mklive-@@MKLIVE_VERSION@@" \
 	> $ROOTFS/etc/xbps/xbps.conf
 echo "TransactionFrequencyFlush = 0" \
 	>> $ROOTFS/etc/xbps/xbps.conf