summaryrefslogtreecommitdiffstats
path: root/initramfs/initrd-stuff/etc/functions
diff options
context:
space:
mode:
Diffstat (limited to 'initramfs/initrd-stuff/etc/functions')
-rw-r--r--initramfs/initrd-stuff/etc/functions6
1 files changed, 6 insertions, 0 deletions
diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions
index a142f5f2..13753cb4 100644
--- a/initramfs/initrd-stuff/etc/functions
+++ b/initramfs/initrd-stuff/etc/functions
@@ -396,6 +396,12 @@ 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
+ 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 && \
+ chown "$i" $1 >/dev/null 2>&1
+ done
}
#############################################################################