1 |
bytegw |
1.1 |
--- e-smith-backup-1.15.0/createlinks.DarWorkstation4 2007-09-05 21:45:52.000000000 +0200 |
2 |
|
|
+++ e-smith-backup-1.15.0/createlinks 2008-05-24 16:11:01.000000000 +0200 |
3 |
|
|
@@ -34,6 +34,14 @@ |
4 |
|
|
templates2events("/etc/crontab", $event); |
5 |
|
|
|
6 |
|
|
#-------------------------------------------------- |
7 |
|
|
+# events for pre-backup action |
8 |
|
|
+#-------------------------------------------------- |
9 |
|
|
+ |
10 |
|
|
+$event = "pre-backup"; |
11 |
|
|
+ |
12 |
|
|
+templates2events("/etc/dar/DailyBackup.dcf", $event); |
13 |
|
|
+ |
14 |
|
|
+#-------------------------------------------------- |
15 |
|
|
# events for rewind-tape action |
16 |
|
|
#-------------------------------------------------- |
17 |
|
|
foreach $event (qw(restore-tape pre-backup post-backup)) |
18 |
|
|
--- e-smith-backup-1.15.0/root/etc/e-smith/events/actions/workstation-backup-dar.DarWorkstation4 2008-05-24 16:22:39.000000000 +0200 |
19 |
|
|
+++ e-smith-backup-1.15.0/root/etc/e-smith/events/actions/workstation-backup-dar 2008-05-24 15:18:28.000000000 +0200 |
20 |
|
|
@@ -114,22 +114,22 @@ |
21 |
|
|
|
22 |
|
|
if ($VFSType eq 'cifs') |
23 |
|
|
{ |
24 |
|
|
- $err = qx(/bin/mount -t cifs $smbhost:$smbshare $mntdir -o user=$login,pass=$password 2>&1); |
25 |
|
|
+ $err = qx(/bin/mount -t cifs "$smbhost:$smbshare" $mntdir -o user=$login,pass=$password 2>&1); |
26 |
|
|
ldie("Error while mounting $smbhost:$smbshare : \n" . $err) if $err; |
27 |
|
|
} |
28 |
|
|
elsif ($VFSType eq 'smbfs') |
29 |
|
|
{ |
30 |
|
|
- $err = qx(/bin/mount -t smbfs //$smbhost/$smbshare $mntdir -o username=$login,password=$password,dmask=777,fmask=777,ip=$smbhost 2>&1); |
31 |
|
|
+ $err = qx(/bin/mount -t smbfs "//$smbhost/$smbshare" $mntdir -o username=$login,password=$password,dmask=777,fmask=777,ip=$smbhost 2>&1); |
32 |
|
|
ldie("Error while mounting //$smbhost/$smbshare : \n" . $err) if $err; |
33 |
|
|
} |
34 |
|
|
elsif ($VFSType eq 'nfs') |
35 |
|
|
{ |
36 |
|
|
- $err = qx(/bin/mount -t nfs -o nolock $smbhost:/$smbshare $mntdir 2>&1); |
37 |
|
|
+ $err = qx(/bin/mount -t nfs -o nolock "$smbhost:/$smbshare" $mntdir 2>&1); |
38 |
|
|
ldie("Error while mounting $smbhost:/$smbshare : \n" . $err) if $err; |
39 |
|
|
} |
40 |
|
|
elsif ($VFSType eq 'usb') |
41 |
|
|
{ |
42 |
|
|
- $err = qx(/bin/mount /$smbshare 2>&1); |
43 |
|
|
+ $err = qx(/bin/mount "/$smbshare" 2>&1); |
44 |
|
|
if ($err) {ldie("Error while mounting /$smbshare : \n" . $err)}; |
45 |
|
|
$mntdir = "/$smbshare"; |
46 |
|
|
} |
47 |
|
|
@@ -301,7 +301,7 @@ |
48 |
|
|
} |
49 |
|
|
|
50 |
|
|
# unmount shared folder |
51 |
|
|
-system("/bin/umount -f $mntdir"); |
52 |
|
|
+system("/bin/umount", "-f", "$mntdir"); |
53 |
|
|
|
54 |
|
|
# time now to update backup configuration |
55 |
|
|
|
56 |
|
|
@@ -334,6 +334,6 @@ |
57 |
|
|
print MAIL $report; |
58 |
|
|
close(MAIL); |
59 |
|
|
} |
60 |
|
|
- system("/bin/umount $mntdir") if $mntdone; |
61 |
|
|
+ system("/bin/umount", "$mntdir") if $mntdone; |
62 |
|
|
die($errmsg); |
63 |
|
|
} |
64 |
|
|
--- e-smith-backup-1.15.0/root/etc/e-smith/web/functions/backup.DarWorkstation4 2008-05-24 16:22:39.000000000 +0200 |
65 |
|
|
+++ e-smith-backup-1.15.0/root/etc/e-smith/web/functions/backup 2008-05-25 10:35:13.000000000 +0200 |
66 |
|
|
@@ -1772,7 +1772,7 @@ |
67 |
|
|
unless ( -d $mntbkdir) |
68 |
|
|
{ |
69 |
|
|
if ($mounted) { |
70 |
|
|
- system("/bin/umount $mntdir") == 0 |
71 |
|
|
+ system("/bin/umount", "$mntdir") == 0 |
72 |
|
|
or die($fm->localise('ERR_WHILE_UNMOUNTING'),"\n"); |
73 |
|
|
} |
74 |
|
|
esmith::cgi::genResult( |
75 |
|
|
@@ -1796,7 +1796,7 @@ |
76 |
|
|
} |
77 |
|
|
|
78 |
|
|
if ($mounted) { |
79 |
|
|
- system("/bin/umount $mntdir") == 0 |
80 |
|
|
+ system("/bin/umount", "$mntdir") == 0 |
81 |
|
|
or die($fm->localise('ERR_WHILE_UNMOUNTING'),"\n"); |
82 |
|
|
} |
83 |
|
|
|
84 |
|
|
@@ -1888,7 +1888,7 @@ |
85 |
|
|
{ |
86 |
|
|
if ($mounted) |
87 |
|
|
{ |
88 |
|
|
- system("/bin/umount $mntdir") == 0 |
89 |
|
|
+ system("/bin/umount", "$mntdir") == 0 |
90 |
|
|
or die($fm->localise('ERR_WHILE_UNMOUNTING'),"\n"); |
91 |
|
|
} |
92 |
|
|
esmith::cgi::genResult($q, $fm->localise('ERR_NO_HOST_DIR'.$id)); |
93 |
|
|
@@ -1904,7 +1904,7 @@ |
94 |
|
|
{ |
95 |
|
|
if ($mounted) |
96 |
|
|
{ |
97 |
|
|
- system("/bin/umount $mntdir") == 0 |
98 |
|
|
+ system("/bin/umount", "$mntdir") == 0 |
99 |
|
|
or die($fm->localise('ERR_WHILE_UNMOUNTING'),"\n"); |
100 |
|
|
} |
101 |
|
|
die('Unsecure data : ' . $backupkey); |
102 |
|
|
@@ -1943,11 +1943,11 @@ |
103 |
|
|
select(STDOUT); |
104 |
|
|
$| = 1; |
105 |
|
|
|
106 |
|
|
- system ("/usr/bin/dar --list $backupkey --noconf") == 0 |
107 |
|
|
+ system ("/usr/bin/dar", "--list", "$backupkey", "--noconf") == 0 |
108 |
|
|
or die ($fm->localise('ERR_EXTRACT')." : ".$!); |
109 |
|
|
|
110 |
|
|
if ($mounted) { |
111 |
|
|
- system("/bin/umount $mntdir") == 0 |
112 |
|
|
+ system("/bin/umount", "$mntdir") == 0 |
113 |
|
|
or die($fm->localise('ERR_WHILE_UNMOUNTING'),"\n"); |
114 |
|
|
} |
115 |
|
|
exit(0); |
116 |
|
|
@@ -2024,7 +2024,7 @@ |
117 |
|
|
{ |
118 |
|
|
if ($mounted) |
119 |
|
|
{ |
120 |
|
|
- system("/bin/umount $mntdir") == 0 |
121 |
|
|
+ system("/bin/umount", "$mntdir") == 0 |
122 |
|
|
or die($fm->localise('ERR_WHILE_UNMOUNTING'),"\n"); |
123 |
|
|
} |
124 |
|
|
esmith::cgi::genResult($q, $fm->localise('ERR_NO_HOST_DIR'.$id)); |
125 |
|
|
@@ -2048,7 +2048,7 @@ |
126 |
|
|
|
127 |
|
|
if ($mounted) |
128 |
|
|
{ |
129 |
|
|
- system("/bin/umount $mntdir") == 0 |
130 |
|
|
+ system("/bin/umount", "$mntdir") == 0 |
131 |
|
|
or die($fm->localise('ERR_WHILE_UNMOUNTING'),"\n"); |
132 |
|
|
} |
133 |
|
|
|
134 |
|
|
@@ -2178,7 +2178,7 @@ |
135 |
|
|
{ |
136 |
|
|
if ($mounted) |
137 |
|
|
{ |
138 |
|
|
- system("/bin/umount $mntdir") == 0 |
139 |
|
|
+ system("/bin/umount", "$mntdir") == 0 |
140 |
|
|
or die($fm->localise('ERR_WHILE_UNMOUNTING'),"\n"); |
141 |
|
|
} |
142 |
|
|
esmith::cgi::genResult( |
143 |
|
|
@@ -2320,17 +2320,17 @@ |
144 |
|
|
{ |
145 |
|
|
if ($mounted) |
146 |
|
|
{ |
147 |
|
|
- system("/bin/umount $mntdir") == 0 |
148 |
|
|
+ system("/bin/umount", "$mntdir") == 0 |
149 |
|
|
or die($fm->localise('ERR_WHILE_UNMOUNTING'),"\n"); |
150 |
|
|
} |
151 |
|
|
die('Unsecure data : ' . $file); |
152 |
|
|
} |
153 |
|
|
- system ("/usr/bin/dar -x $file -v -N -R / -wa"); |
154 |
|
|
+ system ("/usr/bin/dar", "-x", "$file", "-v", "-N", "-R", "/", "-wa"); |
155 |
|
|
} |
156 |
|
|
|
157 |
|
|
if ($mounted) |
158 |
|
|
{ |
159 |
|
|
- system("/bin/umount $mntdir") == 0 |
160 |
|
|
+ system("/bin/umount", "$mntdir") == 0 |
161 |
|
|
or die($fm->localise('ERR_WHILE_UNMOUNTING'),"\n"); |
162 |
|
|
} |
163 |
|
|
|
164 |
|
|
@@ -2412,7 +2412,7 @@ |
165 |
|
|
{ |
166 |
|
|
if ($mounted) |
167 |
|
|
{ |
168 |
|
|
- system("/bin/umount $mntdir") == 0 |
169 |
|
|
+ system("/bin/umount", "$mntdir") == 0 |
170 |
|
|
or die($fm->localise('ERR_WHILE_UNMOUNTING'),"\n"); |
171 |
|
|
} |
172 |
|
|
esmith::cgi::genResult( |
173 |
|
|
@@ -2424,7 +2424,7 @@ |
174 |
|
|
my $catalog = "$mntbkdir/dar-catalog"; |
175 |
|
|
unless ( -e $catalog) |
176 |
|
|
{ |
177 |
|
|
- system("/usr/bin/dar_manager -C $catalog") == 0 |
178 |
|
|
+ system("/usr/bin/dar_manager", "-C", "$catalog") == 0 |
179 |
|
|
or die($fm->localise('ERR_DAR_CATALOG'),"\n"); |
180 |
|
|
} |
181 |
|
|
|
182 |
|
|
@@ -2460,7 +2460,7 @@ |
183 |
|
|
{ |
184 |
|
|
$del = $1; |
185 |
|
|
} |
186 |
|
|
- system("/usr/bin/dar_manager -B $catalog -D $del 1>&2") == 0 |
187 |
|
|
+ system("/usr/bin/dar_manager", "-B", "$catalog", "-D", "$del", "1>&2") == 0 |
188 |
|
|
or die($fm->localise('ERR_DAR_CATALOG'),"\n"); |
189 |
|
|
} |
190 |
|
|
$j--; |
191 |
|
|
@@ -2484,7 +2484,7 @@ |
192 |
|
|
{ |
193 |
|
|
$add = $1; |
194 |
|
|
} |
195 |
|
|
- system("/usr/bin/dar_manager -B $catalog -A $add") == 0 |
196 |
|
|
+ system("/usr/bin/dar_manager", "-B", "$catalog", "-A", "$add") == 0 |
197 |
|
|
or die($fm->localise('ERR_DAR_CATALOG'),"\n"); |
198 |
|
|
} unless $exists; |
199 |
|
|
} |
200 |
|
|
@@ -2568,7 +2568,7 @@ |
201 |
|
|
|
202 |
|
|
if ($mounted) |
203 |
|
|
{ |
204 |
|
|
- system("/bin/umount $mntdir") == 0 |
205 |
|
|
+ system("/bin/umount", "$mntdir") == 0 |
206 |
|
|
or die($fm->localise('ERR_WHILE_UNMOUNTING'),"\n"); |
207 |
|
|
} |
208 |
|
|
} |
209 |
|
|
@@ -2640,7 +2640,7 @@ |
210 |
|
|
{ |
211 |
|
|
if ($mounted) |
212 |
|
|
{ |
213 |
|
|
- system("/bin/umount $mntdir") == 0 |
214 |
|
|
+ system("/bin/umount", "$mntdir") == 0 |
215 |
|
|
or die($fm->localise('ERR_WHILE_UNMOUNTING'),"\n"); |
216 |
|
|
} |
217 |
|
|
esmith::cgi::genResult( |
218 |
|
|
@@ -2672,12 +2672,12 @@ |
219 |
|
|
select(STDOUT); |
220 |
|
|
$| = 1; |
221 |
|
|
|
222 |
|
|
- system ("/usr/bin/dar_manager -B $mntbkdir/dar-catalog -u $backupkey") == 0 |
223 |
|
|
+ system ("/usr/bin/dar_manager", "-B", "$mntbkdir/dar-catalog", "-u", "$backupkey") == 0 |
224 |
|
|
or die ($fm->localise('ERR_EXTRACT')." : ".$!); |
225 |
|
|
|
226 |
|
|
if ($mounted) |
227 |
|
|
{ |
228 |
|
|
- system("/bin/umount $mntdir") == 0 |
229 |
|
|
+ system("/bin/umount", "$mntdir") == 0 |
230 |
|
|
or die($fm->localise('ERR_WHILE_UNMOUNTING'),"\n"); |
231 |
|
|
} |
232 |
|
|
exit(0); |
233 |
|
|
@@ -2808,7 +2808,7 @@ |
234 |
|
|
{ |
235 |
|
|
if ($mounted) |
236 |
|
|
{ |
237 |
|
|
- system("/bin/umount $mntdir") == 0 |
238 |
|
|
+ system("/bin/umount", "$mntdir") == 0 |
239 |
|
|
or die($fm->localise('ERR_WHILE_UNMOUNTING'),"\n"); |
240 |
|
|
} |
241 |
|
|
esmith::cgi::genResult( |
242 |
|
|
@@ -2875,7 +2875,7 @@ |
243 |
|
|
|
244 |
|
|
if ($mounted) |
245 |
|
|
{ |
246 |
|
|
- system("/bin/umount $mntdir") == 0 |
247 |
|
|
+ system("/bin/umount", "$mntdir") == 0 |
248 |
|
|
or die($fm->localise('ERR_WHILE_UNMOUNTING'),"\n"); |
249 |
|
|
} |
250 |
|
|
|
251 |
|
|
@@ -3054,15 +3054,15 @@ |
252 |
|
|
|
253 |
|
|
if ($VFSType eq 'cifs') |
254 |
|
|
{ |
255 |
|
|
- return ( qx(/bin/mount -t cifs $host:$share $mountdir -o user=$login,pass=$password) ); |
256 |
|
|
+ return ( qx(/bin/mount -t cifs "$host:$share" $mountdir -o user=$login,pass=$password) ); |
257 |
|
|
} |
258 |
|
|
elsif ($VFSType eq 'smbfs') |
259 |
|
|
{ |
260 |
|
|
- return ( qx(/bin/mount -t smbfs //$host/$share $mountdir -o username=$login,password=$password,dmask=777,fmask=777,ip=$host 2>&1) ); |
261 |
|
|
+ return ( qx(/bin/mount -t smbfs "//$host/$share" $mountdir -o username=$login,password=$password,dmask=777,fmask=777,ip=$host 2>&1) ); |
262 |
|
|
} |
263 |
|
|
elsif ($VFSType eq 'nfs') |
264 |
|
|
{ |
265 |
|
|
- return ( qx(/bin/mount -t nfs -o nolock $host:/$share $mountdir 2>&1) ); |
266 |
|
|
+ return ( qx(/bin/mount -t nfs -o nolock "$host:/$share" $mountdir 2>&1) ); |
267 |
|
|
} |
268 |
|
|
elsif ($VFSType eq 'usb') |
269 |
|
|
{ |
270 |
|
|
--- e-smith-backup-1.15.0/root/sbin/e-smith/do_backupwk.DarWorkstation4 2008-05-24 16:22:39.000000000 +0200 |
271 |
|
|
+++ e-smith-backup-1.15.0/root/sbin/e-smith/do_backupwk 2008-05-24 15:55:31.000000000 +0200 |
272 |
|
|
@@ -47,7 +47,7 @@ |
273 |
|
|
exit bad_exit($backup_rec, "pre-backup", $status); |
274 |
|
|
} |
275 |
|
|
|
276 |
|
|
-if ($status = system("/etc/e-smith/events/actions/workstation-backup-$program DailyBackup")) |
277 |
|
|
+if ($status = system("/etc/e-smith/events/actions/workstation-backup-$program", "DailyBackup")) |
278 |
|
|
{ |
279 |
|
|
exit bad_exit($backup_rec, "backup", $status); |
280 |
|
|
} |