summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-sysadm/2010-November/000849.html
blob: 445f70daf0e52c63e29f8a38246ddd1179f0b55e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [Mageia-sysadm] [126] use upload.conf from /etc/iurt if not in home ( could be factorized together and with iurt config file code)
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B126%5D%20use%20upload.conf%20from%20/etc/iurt%20if%20not%20in%20home%0A%20%28%20could%20be%20factorized%20together%20and%20with%20iurt%20config%20file%20code%29&In-Reply-To=%3C20101123215213.3C4003FCC8%40valstar.mageia.org%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="000848.html">
   <LINK REL="Next"  HREF="000850.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[Mageia-sysadm] [126] use upload.conf from /etc/iurt if not in home ( could be factorized together and with iurt config file code)</H1>
    <B>root at mageia.org</B> 
    <A HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B126%5D%20use%20upload.conf%20from%20/etc/iurt%20if%20not%20in%20home%0A%20%28%20could%20be%20factorized%20together%20and%20with%20iurt%20config%20file%20code%29&In-Reply-To=%3C20101123215213.3C4003FCC8%40valstar.mageia.org%3E"
       TITLE="[Mageia-sysadm] [126] use upload.conf from /etc/iurt if not in home ( could be factorized together and with iurt config file code)">root at mageia.org
       </A><BR>
    <I>Tue Nov 23 22:52:13 CET 2010</I>
    <P><UL>
        <LI>Previous message: <A HREF="000848.html">[Mageia-sysadm] Puppet Report for jonund.mageia.org
</A></li>
        <LI>Next message: <A HREF="000850.html">[Mageia-sysadm] [426] ensure /etc/iurt/build is a directory
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#849">[ date ]</a>
              <a href="thread.html#849">[ thread ]</a>
              <a href="subject.html#849">[ subject ]</a>
              <a href="author.html#849">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>Revision: 126
Author:   blino
Date:     2010-11-23 22:52:12 +0100 (Tue, 23 Nov 2010)
Log Message:
-----------
use upload.conf from /etc/iurt if not in home (could be factorized together and with iurt config file code)

Modified Paths:
--------------
    build_system/iurt/trunk/emi
    build_system/iurt/trunk/ulri

Modified: build_system/iurt/trunk/emi
===================================================================
--- build_system/iurt/trunk/emi	2010-11-23 20:45:58 UTC (rev 125)
+++ build_system/iurt/trunk/emi	2010-11-23 21:52:12 UTC (rev 126)
@@ -46,7 +46,18 @@
 my $HOME = $ENV{HOME};
 
 my $configfile = &quot;$HOME/.upload.conf&quot;;
+my $sysconfigfile = &quot;/etc/iurt/upload.conf&quot;;
 
+my $config = {};
+foreach my $f ($configfile, $sysconfigfile) {
+    plog('DEBUG', &quot;load config: $f&quot;);
+    if (-f $f) {
+        $config = eval(cat_($f))
+          or die &quot;FATAL $program_name: syntax error in $f&quot;;
+        last;
+    }
+}
+
 my %config_usage = ( 
     admin =&gt; {
 	desc =&gt; 'mail address of the bot administrator',
@@ -94,14 +105,6 @@
     },
 );
 
-my $config;
-if (-f $configfile) {
-    $config = eval(cat_($configfile))
-	or die &quot;FATAL $program_name: syntax error in $configfile&quot;;
-} else {
-    $config = {};
-}
-
 config_usage(\%config_usage, $config) if $run{config_usage};
 config_init(\%config_usage, $config, \%run);
 

Modified: build_system/iurt/trunk/ulri
===================================================================
--- build_system/iurt/trunk/ulri	2010-11-23 20:45:58 UTC (rev 125)
+++ build_system/iurt/trunk/ulri	2010-11-23 21:52:12 UTC (rev 126)
@@ -55,12 +55,16 @@
 
 my $HOME = $ENV{HOME};
 my $configfile = &quot;$HOME/.upload.conf&quot;;
+my $sysconfigfile = &quot;/etc/iurt/upload.conf&quot;;
 
-my $config;
-if (-f $configfile) {
-    $config = eval(cat_($configfile)) or die &quot;FATAL $program_name: syntax error in $configfile&quot;;
-} else {
-    $config = {};
+my $config = {};
+foreach my $f ($configfile, $sysconfigfile) {
+    plog('DEBUG', &quot;load config: $f&quot;);
+    if (-f $f) {
+        $config = eval(cat_($f))
+          or die &quot;FATAL $program_name: syntax error in $f&quot;;
+        last;
+    }
 }
 
 my %config_usage = ( 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: &lt;/pipermail/mageia-sysadm/attachments/20101123/d4ac661d/attachment-0001.html&gt;
</PRE>














<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="000848.html">[Mageia-sysadm] Puppet Report for jonund.mageia.org
</A></li>
	<LI>Next message: <A HREF="000850.html">[Mageia-sysadm] [426] ensure /etc/iurt/build is a directory
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#849">[ date ]</a>
              <a href="thread.html#849">[ thread ]</a>
              <a href="subject.html#849">[ subject ]</a>
              <a href="author.html#849">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-sysadm">More information about the Mageia-sysadm
mailing list</a><br>
</body></html>