## Make sure we're running as the right user.
case $(id -un) in
mirror) ;;
- *) exec userv -fstdin=/dev/null mirror run ;;
+ *) exec userv -fstdin=/dev/null mirror run "$@";;
esac
## Set up a plausible environment.
## Let SIGINT take out the children only.
trap "" INT
+## By default run all of the scripts.
+case $# in 0) set "*" ;; esac
+
## Now do the various mirroring things.
for file in $(run-parts --list etc/mirrors.d); do
[ -x "$file" ] || continue
+
+ matchp=nil
+ leaf=$(echo "$file" | sed 's:^.*/::; s/^[0-9]\+[-_.]//')
+ for pat in "$@"; do
+ case "$leaf" in $pat) matchp=t; break ;; esac
+ done
+ case $matchp in nil) continue ;; esac
+
base=${file##*/}; base=${base#[0-9]*-}
(
echo