diff options
| author | Marco Amadori <marco.amadori@gmail.com> | 2008-08-07 00:07:57 +0200 |
|---|---|---|
| committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 17:48:00 +0100 |
| commit | 31f40045de3ced9d6e30aaab4d18986534318090 (patch) | |
| tree | b6e3259a71cb800da20918ad5dd786c9a94f9008 /scripts | |
| parent | 7ea27f7f7c468dc524bc07ca3565d6ace65b8aff (diff) | |
| download | live-boot-31f40045de3ced9d6e30aaab4d18986534318090.tar.gz live-boot-31f40045de3ced9d6e30aaab4d18986534318090.zip | |
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.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/live-helpers | 6 |
1 files changed, 6 insertions, 0 deletions
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 |
