1 |
diff -ruN e-smith-backup-2.2.0.old/root/etc/e-smith/events/actions/workstation-backup-dar e-smith-backup-2.2.0/root/etc/e-smith/events/actions/workstation-backup-dar |
2 |
--- e-smith-backup-2.2.0.old/root/etc/e-smith/events/actions/workstation-backup-dar 2010-10-10 13:23:42.000000000 +0100 |
3 |
+++ e-smith-backup-2.2.0/root/etc/e-smith/events/actions/workstation-backup-dar 2010-10-10 13:57:47.000000000 +0100 |
4 |
@@ -311,6 +311,17 @@ |
5 |
unless move($_, $setdirname); |
6 |
} |
7 |
|
8 |
+# Check free disk space |
9 |
+my $df = qx(/bin/df -Ph $mntdir); |
10 |
+if ($df =~ /^\S+\s+(\S+)\s+(\S+)\s+(\S+)\s+(\d*%)/mi) |
11 |
+{ |
12 |
+ $report .= "Disk usage $2, $4 full, $3 available\n"; |
13 |
+} |
14 |
+else |
15 |
+{ |
16 |
+ $report .= "Disk space not available\n"; |
17 |
+} |
18 |
+ |
19 |
# unmount shared folder |
20 |
system("/bin/umount", "-f", "$mntdir"); |
21 |
|