[scripts] mkloopcard.sh: export mkfs args to overridable env var
This commit is contained in:
parent
eb41b3e1b9
commit
df20927ca7
@ -1,5 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
export BOOT_PART_MKFS_ARGS="-L boot"
|
||||||
export BOOT_PART_TYPE=ext3
|
export BOOT_PART_TYPE=ext3
|
||||||
export BOOT_PART_TYPE_INSIDE_ROOT=1
|
export BOOT_PART_TYPE_INSIDE_ROOT=1
|
||||||
export ROOT_PART_TYPE=ext4
|
export ROOT_PART_TYPE=ext4
|
||||||
|
@ -37,8 +37,10 @@ CHROOT_DIR="${5}"
|
|||||||
MAKE_TARBALL="${MAKE_TARBALL:-1}"
|
MAKE_TARBALL="${MAKE_TARBALL:-1}"
|
||||||
# Boot partition type
|
# Boot partition type
|
||||||
BOOT_PART_TYPE="${BOOT_PART_TYPE:-vfat}"
|
BOOT_PART_TYPE="${BOOT_PART_TYPE:-vfat}"
|
||||||
|
BOOT_PART_MKFS_ARGS="${BOOT_PART_MKFS_ARGS:--n boot -F 32}"
|
||||||
# Root partition type
|
# Root partition type
|
||||||
ROOT_PART_TYPE="${ROOT_PART_TYPE:-ext3}"
|
ROOT_PART_TYPE="${ROOT_PART_TYPE:-ext3}"
|
||||||
|
ROOT_PART_MKFS_ARGS="${ROOT_PART_MKFS_ARGS:--L Sabayon}"
|
||||||
# Copy /boot content from Root partition to Boot partition?
|
# Copy /boot content from Root partition to Boot partition?
|
||||||
BOOT_PART_TYPE_INSIDE_ROOT="${BOOT_PART_TYPE_INSIDE_ROOT:-}"
|
BOOT_PART_TYPE_INSIDE_ROOT="${BOOT_PART_TYPE_INSIDE_ROOT:-}"
|
||||||
|
|
||||||
@ -123,11 +125,11 @@ echo "Root Partition at : ${root_part}"
|
|||||||
|
|
||||||
# Format boot
|
# Format boot
|
||||||
echo "Formatting ${BOOT_PART_TYPE} ${boot_part}..."
|
echo "Formatting ${BOOT_PART_TYPE} ${boot_part}..."
|
||||||
"mkfs.${BOOT_PART_TYPE}" -n "boot" -F 32 "${boot_part}" || exit 1
|
"mkfs.${BOOT_PART_TYPE}" ${BOOT_PART_MKFS_ARGS} "${boot_part}" || exit 1
|
||||||
|
|
||||||
# Format extfs
|
# Format extfs
|
||||||
echo "Formatting ${ROOT_PART_TYPE} ${root_part}..."
|
echo "Formatting ${ROOT_PART_TYPE} ${root_part}..."
|
||||||
"mkfs.${ROOT_PART_TYPE}" -L "Sabayon" "${root_part}" || exit 1
|
"mkfs.${ROOT_PART_TYPE}" ${ROOT_PART_MKFS_ARGS} "${root_part}" || exit 1
|
||||||
|
|
||||||
boot_tmp_dir=$(mktemp -d)
|
boot_tmp_dir=$(mktemp -d)
|
||||||
if [[ -z "${boot_tmp_dir}" ]]; then
|
if [[ -z "${boot_tmp_dir}" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user