[Box Backup] Another little problem with Linux
Jérôme Schell
boxbackup@fluffy.co.uk
Mon, 31 May 2004 17:27:31 +0200
Hi again,
I've noticed another little problem with the bbackupd-config script on
my Linux system. It seems that the "whereis sendmail" command doesn't
return the same output on Debian Linux and *BSD (and other Linux perhaps).
On Debian Linux it returns :
sendmail: /usr/sbin/sendmail /usr/lib/sendmail
/usr/share/man/man1/sendmail.1.gz
Funny isn't it :)
I had to add this code to make it work :
--------------------------
--- boxbackup-0.06/bin/bbackupd/bbackupd-config 2004-05-20
17:19:50.000000000 +0200
+++ boxbackup-0.06.mod/bin/bbackupd/bbackupd-config 2004-05-31
17:10:19.000000000 +0200
@@ -240,6 +240,12 @@
my $current_username = `whoami`; chomp $current_username;
my $sendmail = `whereis sendmail`; chomp $sendmail;
$sendmail =~ s/\n.\Z//s;
+
+# Added for Linux
+if ($sendmail =~ /^sendmail:\s+([\S]+)/) {
+ $sendmail = $1;
+}
+
$sendmail = 'sendmail' if $sendmail !~ m/\S/;
print NOTIFY <<__EOS;
--------------------------
--
Jérôme