summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2014-07-28 23:21:15 +0100
committerColin Guthrie <colin@mageia.org>2014-07-28 23:21:15 +0100
commit5acc38d8ff13f871d5b6de3a80a05bf349f1aee8 (patch)
tree4f88f10c3b1b19e32b681f86221a5b50108a72bf
parent970918c53f74801902f2b29a78d738489d783016 (diff)
downloadmgatools-5acc38d8ff13f871d5b6de3a80a05bf349f1aee8.tar
mgatools-5acc38d8ff13f871d5b6de3a80a05bf349f1aee8.tar.gz
mgatools-5acc38d8ff13f871d5b6de3a80a05bf349f1aee8.tar.bz2
mgatools-5acc38d8ff13f871d5b6de3a80a05bf349f1aee8.tar.xz
mgatools-5acc38d8ff13f871d5b6de3a80a05bf349f1aee8.zip
functions: Move default values into the main include file.
This keeps the config file but ensures it's not 100% needed via default values
-rw-r--r--functions14
-rw-r--r--mgatools.conf28
2 files changed, 26 insertions, 16 deletions
diff --git a/functions b/functions
index 8ecd968..53bec75 100644
--- a/functions
+++ b/functions
@@ -1,5 +1,19 @@
# to be sourced
+# Default values
+dryrun=echo
+moveupdate_allowed_group='mga-qa'
+moveupdate_mailto='sysadmin-reports@ml.mageia.org'
+requestuser="${SUDO_USER:-$USER}"
+moveupdate_mailfrom="$requestuser <root@mageia.org>"
+distribdir='/distrib/bootstrap/distrib'
+finaldistribdir='/distrib/mirror/distrib'
+distrosections='core nonfree tainted'
+distrosubsections='release updates updates_testing backports backports_testing'
+distroreleases='1 2 3 4'
+arches='i586 x86_64'
+mirror_rsync_options="--dry-run -v --delete -alH"
+
. /etc/mgatools.conf
function isingroup()
diff --git a/mgatools.conf b/mgatools.conf
index 6467b35..aeb2b29 100644
--- a/mgatools.conf
+++ b/mgatools.conf
@@ -1,16 +1,12 @@
-dryrun=echo
-moveupdate_allowed_group=mga-qa
-moveupdate_mailto=sysadmin-reports@ml.mageia.org
-if [ -z $SUDO_USER ]
-then
- requestuser="$USER"
-else
- requestuser="$SUDO_USER"
-fi
-moveupdate_mailfrom="$requestuser <root@mageia.org>"
-distribdir=/distrib/bootstrap/distrib
-finaldistribdir=/distrib/mirror/distrib
-distroreleases='1'
-distrosections='core nonfree tainted'
-arches='i586 x86_64'
-mirror_rsync_options="--dry-run --delete -alH"
+#dryrun=echo
+#moveupdate_allowed_group='mga-qa'
+#moveupdate_mailto='sysadmin-reports@ml.mageia.org'
+#requestuser="${SUDO_USER:-$USER}"
+#moveupdate_mailfrom="$requestuser <root@mageia.org>"
+#distribdir='/distrib/bootstrap/distrib'
+#finaldistribdir='/distrib/mirror/distrib'
+#distrosections='core nonfree tainted'
+#distrosubsections='release updates updates_testing backports backports_testing'
+#distroreleases='1 2 3 4'
+#arches='i586 x86_64'
+#mirror_rsync_options="--dry-run -v --delete -alH"