aboutsummaryrefslogtreecommitdiffstats
path: root/init-sh/file_perm.sh
diff options
context:
space:
mode:
Diffstat (limited to 'init-sh/file_perm.sh')
-rwxr-xr-xinit-sh/file_perm.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/init-sh/file_perm.sh b/init-sh/file_perm.sh
index acce5c0..0e13e9c 100755
--- a/init-sh/file_perm.sh
+++ b/init-sh/file_perm.sh
@@ -1,11 +1,13 @@
#!/bin/bash
-IFS="
-"
+if [ ! -s $1 ]; then
+ echo "I need a msec permfile in argument".
+ exit 1
+fi
echo -n "Setting files permissions : "
-cat $1 | while read file owner perm; do
+grep -v "^#" $1 | while read file owner perm; do
if [ -a "${file}" ]; then
if [ ${owner} != "current" ]; then
chown ${owner} ${file}
@@ -16,4 +18,3 @@ done
echo "done."
-