matching links in /z/ now too
[feisty_meow.git] / scripts / security / cool_permissionator.sh
index 855511e6941cd03fdb90168953794405024a9ff8..c6f9bd86cdd319a6fd6f5535067ff47e86010a59 100644 (file)
@@ -23,6 +23,14 @@ function reapply_cool_permissions()
   done
 #echo arch addin now is: $arch_addin
 
+  # now another round with similar setup, to ensure we get any directories
+  # that actually live out in /z but not in /home/archives.
+  ARCHIVE_TOP=/z
+  for dirname in $arch_builder; do
+    arch_addin+="$ARCHIVE_TOP/$dirname "
+  done
+#echo arch addin now is: $arch_addin
+
   # special case that makes our software hierarchy folder, if it doesn't exist.
   # everything else is only re-permed if it exists.
   if [ ! -d "$DEFAULT_FEISTYMEOW_ORG_DIR" ]; then
@@ -43,7 +51,7 @@ function reapply_cool_permissions()
         /usr/local/${cooluser} \
         /home/games \
         $arch_addin; do
-    if [ -d "$dirname" ]; then
+    if [ -d "$dirname" -o -L "$dirname" ]; then
       echo "revising ownership on '$dirname'"
       sudo chown -R ${cooluser}:${cooluser} "$dirname"
       continue_on_error "chowning for ${cooluser}: $dirname"