From: Marco Amadori Date: Wed, 6 Aug 2008 22:07:57 +0000 (+0200) Subject: Be sure that the discovered filesystem is not null. X-Git-Tag: debian/2.0.15-1~490 X-Git-Url: http://git.grml.org/?a=commitdiff_plain;h=31f40045de3ced9d6e30aaab4d18986534318090;p=live-boot-grml.git Be sure that the discovered filesystem is not null. - While scanning for a filesystem on a disk, the klibc utility can return a null string if it not finds a filesystem (e.g. on a container partition), and grepping for a null string either reports true if escaped or hangs grep if not escaped. Both conditions must be avoided in order to report that the kernel supports the filesystem named as the string. --- diff --git a/scripts/live-helpers b/scripts/live-helpers index e1f69dd..619cbb4 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -33,6 +33,12 @@ is_supported_fs () { fstype="${1}" + # Validate input first + if [ -z "${fstype}" ] + then + return 1 + fi + # Try to look if it is already supported by the kernel if grep -q ${fstype} /proc/filesystems then