2012-03-12 15:18:41 +01:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Fixes permissions on repositories
|
|
|
|
# Copyright (c) 2009-2010 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
|
|
#
|
|
|
|
. /usr/share/makedist/functions.inc.sh
|
|
|
|
. /etc/sysconfig/openmamba-central
|
|
|
|
|
|
|
|
for rep in ${local_reps[*]}; do
|
|
|
|
getent passwd ftp$rep >/dev/null || {
|
|
|
|
echo "Warning: missing user ftp$rep for $rep repository; skipping."
|
|
|
|
continue
|
|
|
|
}
|
2012-03-12 15:49:03 +01:00
|
|
|
find /var/ftp/pub/openmamba/$rep/SRPMS.base \
|
|
|
|
-user ftp$rep -a -group users -o -exec chown ftp$rep:users {} \;
|
|
|
|
for a in ${archs[*]}; do
|
|
|
|
[ -e /var/ftp/pub/openmamba/$rep/RPMS.$a ] && \
|
|
|
|
find /var/ftp/pub/openmamba/$rep/RPMS.$a \
|
|
|
|
-user ftp$rep -a -group users -o -exec chown ftp$rep:users {} \;
|
|
|
|
done
|
2012-03-12 15:18:41 +01:00
|
|
|
# >/dev/null
|
|
|
|
done
|
|
|
|
|
|
|
|
exit 0
|