create-user: Make .domtool symlink with correct ownership
authormwolson_admin <mwolson_admin@deleuze.hcoop.net>
Wed, 12 Dec 2007 17:24:56 +0000 (12:24 -0500)
committermwolson_admin <mwolson_admin@deleuze.hcoop.net>
Wed, 12 Dec 2007 17:24:56 +0000 (12:24 -0500)
Apparently, it is not possible to change the ownership of a symlink that
is in AFS.  Presumably, that information is not paid attention to.  It
might just be for cosmetics that we do this.

I'm leaving the existing symlinks in user directories alone, because I'd
basically have to remove the symlink and make a new one, and I'd rather
not disrupt service.

create-user

index 9a9276a..ce6304f 100755 (executable)
@@ -194,8 +194,7 @@ mkdir -p $HOMEPATH/.public/.domtool
 chown $USER:nogroup $HOMEPATH/.public/.domtool
 test -e $HOMEPATH/.domtool || \
     test -L $HOMEPATH/.domtool || \
-        ln -s $HOMEPATH/.public/.domtool $HOMEPATH/.domtool
-test -e $HOMEPATH/.domtool && chown $USER:nogroup $HOMEPATH/.domtool
+        sudo -u $USER ln -s $HOMEPATH/.public/.domtool $HOMEPATH/.domtool
 
 # Gitweb hosting
 test -L /var/cache/git/$USER || \