[SCM] live-build branch, debian-next, updated. debian/3.0_a31-1-2-gbb71834

Daniel Baumann daniel at debian.org
Mon Sep 12 07:19:32 UTC 2011


The following commit has been merged in the debian-next branch:
commit bb718340e227fe25761fc52469664428323ea1a9
Author: Daniel Baumann <daniel at debian.org>
Date:   Mon Sep 12 09:19:30 2011 +0200

    Adding option for setting filesystem label on usb-hdd images.

diff --git a/functions/defaults.sh b/functions/defaults.sh
index 643123c..f157091 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -1010,6 +1010,29 @@ Set_defaults ()
 			;;
 	esac
 
+	# Setting hdd options
+	case "${LB_MODE}" in
+		debian)
+			LB_HDD_LABEL="${LB_HDD_LABEL:-DEBIAN_LIVE}"
+			;;
+
+		emdebian)
+			LB_HDD_LABEL="${LB_HDD_LABEL:-EMDEBIAN_LIVE}"
+			;;
+
+		progress)
+			LB_HDD_LABEL="${LB_HDD_LABEL:-PROGRESS_$(echo ${LB_DISTRIBUTION} | tr [a-z][A-Z])}"
+			;;
+
+		ubuntu)
+			LB_HDD_LABEL="${LB_HDD_LABEL:-UBUNTU}"
+			;;
+
+		kubuntu)
+			LB_HDD_LABEL="${LB_HDD_LABEL:-KUBUNTU}"
+			;;
+	esac
+
 	# Setting iso volume
 	case "${LB_MODE}" in
 		debian)
diff --git a/scripts/build/lb_binary_usb b/scripts/build/lb_binary_usb
index 228827d..ad03caa 100755
--- a/scripts/build/lb_binary_usb
+++ b/scripts/build/lb_binary_usb
@@ -172,17 +172,17 @@ Losetup $FREELO chroot/binary.img 1
 case "${LB_BINARY_FILESYSTEM}" in
 	ext2|ext3|ext4)
 		MKFS="${LB_BINARY_FILESYSTEM}"
-		MKFS_OPTIONS="-L DEBIAN_LIVE -m 0"
+		MKFS_OPTIONS="-L ${LB_HDD_LABEL} -m 0"
 		;;
 
 	fat16)
 		MKFS="vfat"
-		MKFS_OPTIONS="-F 16 -n DEBIAN_LIVE"
+		MKFS_OPTIONS="-F 16 -n ${LB_HDD_LABEL}"
 		;;
 
 	fat32)
 		MKFS="vfat"
-		MKFS_OPTIONS="-F 32 -n DEBIAN_LIVE"
+		MKFS_OPTIONS="-F 32 -n ${LB_HDD_LABEL}"
 		;;
 esac
 
diff --git a/scripts/build/lb_config b/scripts/build/lb_config
index d231a7d..af9c7d9 100755
--- a/scripts/build/lb_config
+++ b/scripts/build/lb_config
@@ -83,6 +83,7 @@ USAGE="${PROGRAM}   [--apt apt|aptitude]\n\
 \t    [--initsystem sysvinit|runit|systemd|upstart|none]\n\
 \t    [--interactive shell]\n\
 \t    [--isohybrid-options OPTION|\"OPTIONS\"]\n\
+\t    [--hdd-label LABEL]\n\
 \t    [--iso-application NAME]\n\
 \t    [--iso-preparer NAME]\n\
 \t    [--iso-publisher NAME]\n\
@@ -163,7 +164,7 @@ Local_arguments ()
 		package-lists:,tasks:,security:,volatile:,backports:,binary-filesystem:,binary-images:,
 		apt-indices:,bootappend-install:,bootappend-live:,bootloader:,checksums:,compression:,build-with-chroot:,
 		debian-installer:,debian-installer-distribution:,debian-installer-preseedfile:,debian-installer-gui:,
-		grub-splash:,hostname:,isohybrid-options:,iso-application:,iso-preparer:,iso-publisher:,
+		grub-splash:,hostname:,isohybrid-options:,hdd-label:,iso-application:,iso-preparer:,iso-publisher:,
 		iso-volume:,jffs2-eraseblock:,memtest:,net-root-filesystem:,net-root-mountoptions:,
 		net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,
 		net-cow-server:,net-tarball:,swap-file-path:,swap-file-size:,syslinux-theme:,
@@ -669,6 +670,11 @@ Local_arguments ()
 				shift 2
 				;;
 
+			--hdd-label)
+				LB_HDD_LABEL="${2}"
+				shift 2
+				;;
+
 			--iso-application)
 				LB_ISO_APPLICATION="${2}"
 				shift 2
@@ -1303,6 +1309,11 @@ LB_GRUB_SPLASH="${LB_GRUB_SPLASH}"
 # (Default: ${LB_HOSTNAME})
 LB_HOSTNAME="${LB_HOSTNAME}"
 
+# \$LB_HDD_LABEL: set hdd label
+# (Default: ${LB_HDD_LABEL})
+LB_HDD_LABEL="${LB_HDD_LABEL}"
+
+
 # \$LB_ISO_APPLICATION: set iso author
 # (Default: ${LB_ISO_APPLICATION})
 LB_ISO_APPLICATION="${LB_ISO_APPLICATION}"
diff --git a/scripts/build/lb_source_usb b/scripts/build/lb_source_usb
index 1ba7e44..6f2fde7 100755
--- a/scripts/build/lb_source_usb
+++ b/scripts/build/lb_source_usb
@@ -100,17 +100,17 @@ Losetup $FREELO source.img 1
 case "${LB_BINARY_FILESYSTEM}" in
 	ext2|ext3|ext4)
 		MKFS="${LB_BINARY_FILESYSTEM}"
-		MKFS_OPTIONS="-L DEBIAN_LIVE -m 0"
+		MKFS_OPTIONS="-L ${LB_HDD_LABEL} -m 0"
 		;;
 
 	fat16)
 		MKFS="vfat"
-		MKFS_OPTIONS="-F 16 -n DEBIAN_LIVE"
+		MKFS_OPTIONS="-F 16 -n ${LB_HDD_LABEL}"
 		;;
 
 	fat32)
 		MKFS="vfat"
-		MKFS_OPTIONS="-F 32 -n DEBIAN_LIVE"
+		MKFS_OPTIONS="-F 32 -n ${LB_HDD_LABEL}"
 		;;
 esac
 

-- 
live-build



More information about the debian-live-changes mailing list