summaryrefslogtreecommitdiff
path: root/user-init
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2003-03-13 04:47:32 +0000
committerJonas Smedegaard <dr@jones.dk>2003-03-13 04:47:32 +0000
commitc2d02f6b1b8fc09fe9b02ec8fbc82bd980964f36 (patch)
treebf03d53bf3abd1dab7ca385ed6513d5c2f1e7fb3 /user-init
parent39742c443a119530c0ce3a4ebc184c04e61e5d86 (diff)
Fix completely ignoed non-exceptions for shares. Set toplevel .AppleDouble group r/o.
Diffstat (limited to 'user-init')
-rwxr-xr-xuser-init18
1 files changed, 14 insertions, 4 deletions
diff --git a/user-init b/user-init
index 116241f..118b26d 100755
--- a/user-init
+++ b/user-init
@@ -175,6 +175,7 @@ for user in $USERS; do
mac)
dirs_group_rw_create='.AppleDB/.AppleDesktop/Temporary Items/TheFindByContentFolder'
dirs_group_ro_create='TheVolumeSettingsFolder'
+ dirs_group_ro_update='.AppleDouble'
files_group_ro_update=':2eDS_Store'
dirs_no_access_purge='Network Trash Folder'
;;
@@ -184,7 +185,7 @@ for user in $USERS; do
continue
;;
esac
- exceptions="$dirs_group_rw_create/$dirs_group_ro_create/$files_group_ro_update/$dirs_no_access_purge"
+ exceptions="$dirs_group_rw_create/$dirs_group_ro_create/$dirs_group_ro_update/$files_group_ro_update/$dirs_no_access_purge"
exception_dirs_create="$dirs_group_rw_create/$dirs_group_ro_create"
chown "$user": "$thisdir"
chmod a=rX "$thisdir"
@@ -203,8 +204,11 @@ for user in $USERS; do
ifs="$IFS"
# Set default permissions
find "$thisdir" -mindepth 1 -maxdepth 1 -print | (while read thisdir; do
- IFS="/"; for dir in $exceptions; do IFS="$ifs";
- continue 2
+ item="`basename \"$thisdir\"`"
+ IFS="/"; for exception in $exceptions; do IFS="$ifs";
+ if [ "$item" = "$exception" ]; then
+ continue 2
+ fi
done
chgrp -R "$rwgroup" "$thisdir"
chmod -R ug=rw,o=r,a+X,g+s "$thisdir"
@@ -225,9 +229,15 @@ for user in $USERS; do
IFS="/"; for dir in $dirs_group_ro_create; do IFS="$ifs";
chmod -R u=rw,go=r,a+X,g+s "$thisdir/$dir"
done
+ # Handle exception dirs to be updated if already there
+ IFS="/"; for dir in $dirs_group_ro_update; do IFS="$ifs";
+ if [ -e "$thisdir/$dir" ]; then
+ chmod u=rw,go=r,a+X,g+s "$thisdir/$dir"
+ fi
+ done
# Handle exception files to be updated if already there
IFS="/"; for file in $files_group_ro_update; do IFS="$ifs";
- if [ -f "$thisdir/$file" ]; then
+ if [ -e "$thisdir/$file" ]; then
chmod u=rw,go=r,g+s "$thisdir/$file"
fi
done