chiark / gitweb /
extract-profile: Add manpage.
[distorted-keys] / userv / claim-dir.in
index d5f14db..ef8349e 100644 (file)
@@ -18,7 +18,7 @@ if ( glob service claim-dir
          1) filsys=$1 ;;                                               \
          *) echo >&2 \"usage: $quis FILSYS\"; exit 1 ;;                \
        esac;                                                           \
-       foundp=nil;                                                     \
+       foundp=nil; mode=700;                                           \
        while read fs dir opts; do                                      \
          case \"$fs\" in                                               \
            \\#* | \"\") continue ;;                                    \
@@ -63,6 +63,9 @@ if ( glob service claim-dir
                  ;;                                                    \
              esac                                                      \
              ;;                                                        \
+           mode=*)                                                     \
+             mode=$arg                                                 \
+             ;;                                                        \
            mount=*)                                                    \
              if ! mountpoint -q \"$dir\"; then $arg \"$dir\"; fi       \
              ;;                                                        \
@@ -76,7 +79,7 @@ if ( glob service claim-dir
        set _ $USERV_GROUP; group=$2;                                   \
        cd \"$dir\";                                                    \
        if [ ! -d \"$user\" ]; then                                     \
-         mkdir -m700 \"$user\";                                        \
+         mkdir -m$mode \"$user\";                                      \
          chown \"$user:$group\" \"$user\";                             \
        fi;                                                             \
        echo \"$dir/$USERV_USER\"                                       \