Add support for USB sticks any integer multiple of 1GB in size.
Factor out the common code, support anything called STICKnnnGB where nnn is any integer
This commit is contained in:
parent
114e8a3e55
commit
890ab6645a
6
CONF.sh
6
CONF.sh
|
@ -232,11 +232,7 @@ ATTEMPT_FALLBACK=yes
|
||||||
# DLDVD: standard 8.5 GB dual-layer DVD
|
# DLDVD: standard 8.5 GB dual-layer DVD
|
||||||
# BD: standard 25 GB blu-ray
|
# BD: standard 25 GB blu-ray
|
||||||
# DLBD: standard 50 GB dual-layer blu-ray
|
# DLBD: standard 50 GB dual-layer blu-ray
|
||||||
# STICK1GB: 1GB USB stick or similar
|
# STICK<X>GB: <X>GB USB stick or similar
|
||||||
# STICK2GB: 2GB USB stick or similar
|
|
||||||
# STICK4GB: 4GB USB stick or similar
|
|
||||||
# STICK8GB: 8GB USB stick or similar
|
|
||||||
# STICK16GB: 16GB USB stick or similar
|
|
||||||
# CUSTOM: up to you - specify a size to go with it (in 2K blocks)
|
# CUSTOM: up to you - specify a size to go with it (in 2K blocks)
|
||||||
export DISKTYPE=CD
|
export DISKTYPE=CD
|
||||||
#export DISKTYPE=CUSTOM
|
#export DISKTYPE=CUSTOM
|
||||||
|
|
|
@ -23,7 +23,7 @@ debian-cd (3.1.24) UNRELEASED; urgency=medium
|
||||||
jigdo files, to reduce load on the service.
|
jigdo files, to reduce load on the service.
|
||||||
* Don't include -686-pae udebs on media - we may not have a kernel
|
* Don't include -686-pae udebs on media - we may not have a kernel
|
||||||
to use with them anyway
|
to use with them anyway
|
||||||
* Add explicit support for 16G USB sticks
|
* Add support for USB sticks any integer multiple of 1GB in size.
|
||||||
|
|
||||||
-- Holger Levsen <holger@debian.org> Wed, 20 Feb 2019 14:12:16 +0100
|
-- Holger Levsen <holger@debian.org> Wed, 20 Feb 2019 14:12:16 +0100
|
||||||
|
|
||||||
|
|
|
@ -757,21 +757,9 @@ sub get_disc_size {
|
||||||
# Useable capacity, found by checking some disks
|
# Useable capacity, found by checking some disks
|
||||||
$maxdiskblocks = 23652352 - $reserved;
|
$maxdiskblocks = 23652352 - $reserved;
|
||||||
$diskdesc = "50GB DLBD";
|
$diskdesc = "50GB DLBD";
|
||||||
} elsif ($chosen_disk eq "STICK1GB") {
|
} elsif ($chosen_disk =~ /STICK(\d+)GB/) {
|
||||||
$maxdiskblocks = int(1 * $GB / $blocksize) - $reserved;
|
$maxdiskblocks = int($1 * $GB / $blocksize) - $reserved;
|
||||||
$diskdesc = "1GB STICK";
|
$diskdesc = "$1GB STICK";
|
||||||
} elsif ($chosen_disk eq "STICK2GB") {
|
|
||||||
$maxdiskblocks = int(2 * $GB / $blocksize) - $reserved;
|
|
||||||
$diskdesc = "2GB STICK";
|
|
||||||
} elsif ($chosen_disk eq "STICK4GB") {
|
|
||||||
$maxdiskblocks = int(4 * $GB / $blocksize) - $reserved;
|
|
||||||
$diskdesc = "4GB STICK";
|
|
||||||
} elsif ($chosen_disk eq "STICK8GB") {
|
|
||||||
$maxdiskblocks = int(8 * $GB / $blocksize) - $reserved;
|
|
||||||
$diskdesc = "8GB STICK";
|
|
||||||
} elsif ($chosen_disk eq "STICK16GB") {
|
|
||||||
$maxdiskblocks = int(16 * $GB / $blocksize) - $reserved;
|
|
||||||
$diskdesc = "16GB STICK";
|
|
||||||
} elsif ($chosen_disk eq "CUSTOM") {
|
} elsif ($chosen_disk eq "CUSTOM") {
|
||||||
$maxdiskblocks = $ENV{'CUSTOMSIZE'} - $reserved ||
|
$maxdiskblocks = $ENV{'CUSTOMSIZE'} - $reserved ||
|
||||||
die "Need to specify a custom size for the CUSTOM disktype\n";
|
die "Need to specify a custom size for the CUSTOM disktype\n";
|
||||||
|
|
Loading…
Reference in New Issue