summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-11-12 22:43:28 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:22:29 +0100
commit8321653cb36511324d576e65cb13b5c9b0c5f438 (patch)
tree0337ce8bc654b91cd2cd25eb418183e6668e9ea7 /functions
parentb47d0c480df34c1c15ac83166ae246991ce72385 (diff)
downloadvyos-live-build-8321653cb36511324d576e65cb13b5c9b0c5f438.tar.gz
vyos-live-build-8321653cb36511324d576e65cb13b5c9b0c5f438.zip
Adding check to detect gnu-fdisk and using the original fdisk, thanks to Peter Skogström <peter.skogstrom@bitrunner.com> for the report.
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/defaults.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh
index a7a123814..6c76ac774 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -138,10 +138,27 @@ Set_defaults ()
fi
fi
+ # Setting fdisk
+ if [ -z "${LH_FDISK}" ] || [ ! -x "${LH_FDISK}" ]
+ then
+ # Workaround for gnu-fdisk divertion
+ # (gnu-fdisk is buggy, #445304).
+ if [ -x /sbin/fdisk.distrib ]
+ then
+ LH_FDISK="fdisk.distrib"
+ elif [ -x /sbin/fdisk ]
+ then
+ LH_FDISK="fdisk"
+ else
+ echo "E: Can't proces file /sbin/fdisk (FIXME)"
+ fi
+ fi
+
# Setting losetup
if [ -z "${LH_LOSETUP}" ] || [ ! -x "${LH_LOSETUP}" ]
then
# Workaround for loop-aes-utils divertion
+ # (loop-aes-utils' losetup lacks features).
if [ -x /sbin/losetup.orig ]
then
LH_LOSETUP="losetup.orig"