Adding option for setting filesystem label on usb-hdd images.
This commit is contained in:
parent
80fa0406d9
commit
bb718340e2
|
@ -1010,6 +1010,29 @@ Set_defaults ()
|
||||||
;;
|
;;
|
||||||
esac
|
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
|
# Setting iso volume
|
||||||
case "${LB_MODE}" in
|
case "${LB_MODE}" in
|
||||||
debian)
|
debian)
|
||||||
|
|
|
@ -172,17 +172,17 @@ Losetup $FREELO chroot/binary.img 1
|
||||||
case "${LB_BINARY_FILESYSTEM}" in
|
case "${LB_BINARY_FILESYSTEM}" in
|
||||||
ext2|ext3|ext4)
|
ext2|ext3|ext4)
|
||||||
MKFS="${LB_BINARY_FILESYSTEM}"
|
MKFS="${LB_BINARY_FILESYSTEM}"
|
||||||
MKFS_OPTIONS="-L DEBIAN_LIVE -m 0"
|
MKFS_OPTIONS="-L ${LB_HDD_LABEL} -m 0"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
fat16)
|
fat16)
|
||||||
MKFS="vfat"
|
MKFS="vfat"
|
||||||
MKFS_OPTIONS="-F 16 -n DEBIAN_LIVE"
|
MKFS_OPTIONS="-F 16 -n ${LB_HDD_LABEL}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
fat32)
|
fat32)
|
||||||
MKFS="vfat"
|
MKFS="vfat"
|
||||||
MKFS_OPTIONS="-F 32 -n DEBIAN_LIVE"
|
MKFS_OPTIONS="-F 32 -n ${LB_HDD_LABEL}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
|
@ -83,6 +83,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
|
||||||
\t [--initsystem sysvinit|runit|systemd|upstart|none]\n\
|
\t [--initsystem sysvinit|runit|systemd|upstart|none]\n\
|
||||||
\t [--interactive shell]\n\
|
\t [--interactive shell]\n\
|
||||||
\t [--isohybrid-options OPTION|\"OPTIONS\"]\n\
|
\t [--isohybrid-options OPTION|\"OPTIONS\"]\n\
|
||||||
|
\t [--hdd-label LABEL]\n\
|
||||||
\t [--iso-application NAME]\n\
|
\t [--iso-application NAME]\n\
|
||||||
\t [--iso-preparer NAME]\n\
|
\t [--iso-preparer NAME]\n\
|
||||||
\t [--iso-publisher NAME]\n\
|
\t [--iso-publisher NAME]\n\
|
||||||
|
@ -163,7 +164,7 @@ Local_arguments ()
|
||||||
package-lists:,tasks:,security:,volatile:,backports:,binary-filesystem:,binary-images:,
|
package-lists:,tasks:,security:,volatile:,backports:,binary-filesystem:,binary-images:,
|
||||||
apt-indices:,bootappend-install:,bootappend-live:,bootloader:,checksums:,compression:,build-with-chroot:,
|
apt-indices:,bootappend-install:,bootappend-live:,bootloader:,checksums:,compression:,build-with-chroot:,
|
||||||
debian-installer:,debian-installer-distribution:,debian-installer-preseedfile:,debian-installer-gui:,
|
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:,
|
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-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:,
|
net-cow-server:,net-tarball:,swap-file-path:,swap-file-size:,syslinux-theme:,
|
||||||
|
@ -669,6 +670,11 @@ Local_arguments ()
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
--hdd-label)
|
||||||
|
LB_HDD_LABEL="${2}"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
|
||||||
--iso-application)
|
--iso-application)
|
||||||
LB_ISO_APPLICATION="${2}"
|
LB_ISO_APPLICATION="${2}"
|
||||||
shift 2
|
shift 2
|
||||||
|
@ -1303,6 +1309,11 @@ LB_GRUB_SPLASH="${LB_GRUB_SPLASH}"
|
||||||
# (Default: ${LB_HOSTNAME})
|
# (Default: ${LB_HOSTNAME})
|
||||||
LB_HOSTNAME="${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
|
# \$LB_ISO_APPLICATION: set iso author
|
||||||
# (Default: ${LB_ISO_APPLICATION})
|
# (Default: ${LB_ISO_APPLICATION})
|
||||||
LB_ISO_APPLICATION="${LB_ISO_APPLICATION}"
|
LB_ISO_APPLICATION="${LB_ISO_APPLICATION}"
|
||||||
|
|
|
@ -100,17 +100,17 @@ Losetup $FREELO source.img 1
|
||||||
case "${LB_BINARY_FILESYSTEM}" in
|
case "${LB_BINARY_FILESYSTEM}" in
|
||||||
ext2|ext3|ext4)
|
ext2|ext3|ext4)
|
||||||
MKFS="${LB_BINARY_FILESYSTEM}"
|
MKFS="${LB_BINARY_FILESYSTEM}"
|
||||||
MKFS_OPTIONS="-L DEBIAN_LIVE -m 0"
|
MKFS_OPTIONS="-L ${LB_HDD_LABEL} -m 0"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
fat16)
|
fat16)
|
||||||
MKFS="vfat"
|
MKFS="vfat"
|
||||||
MKFS_OPTIONS="-F 16 -n DEBIAN_LIVE"
|
MKFS_OPTIONS="-F 16 -n ${LB_HDD_LABEL}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
fat32)
|
fat32)
|
||||||
MKFS="vfat"
|
MKFS="vfat"
|
||||||
MKFS_OPTIONS="-F 32 -n DEBIAN_LIVE"
|
MKFS_OPTIONS="-F 32 -n ${LB_HDD_LABEL}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue