From f122f92da1860d9e0e95911b3432681ab0b9ad53 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Fri, 8 Aug 2008 21:36:17 +0000 Subject: Run testmkd extension (chmod,own) only if needed ... git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1997 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/initrd-stuff/etc/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'initramfs/initrd-stuff/etc/functions') diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions index 13753cb4..ca3da314 100644 --- a/initramfs/initrd-stuff/etc/functions +++ b/initramfs/initrd-stuff/etc/functions @@ -396,7 +396,7 @@ echo "fileget via $fileprot from $fileserv/$cfgfile finished" >/tmp/file-done # to recreate directories in union mounts testmkd () { test -d $1 || mkdir -p $1 >/dev/null 2>&1 - for i in "$2" "$3" ; do + [ $# -ge 2 ] && for i in "$2" "$3" ; do echo "$i"|grep -E "^[0-9]{3,4}$" >/dev/null 2>&1 && \ chmod "$i" $1 >/dev/null 2>&1 echo "$i"|grep -E ":." >/dev/null 2>&1 && \ -- cgit v1.2.3-55-g7522