[CentOS] Is this a bug in CentOS-7 BackupPC?

Sat Sep 26 19:12:40 UTC 2015
Timothy Murphy <gayleard at eircom.net>

Fabian Arrotin wrote:

>> This message occurs in the Perl script
>> /usr/share/BackupPC/bin/BackupPC :
>> 
>> my $sockFile = "/var/run/BackupPC/BackupPC.sock";
>> unlink($sockFile); if ( !bind(SERVER_UNIX, sockaddr_un($sockFile))
>> ) { print(LOG $bpc->timeStamp, "unix bind() failed: $!\n");
>> exit(1); }
>> 
>> As far as I can see (I'm no guru) this is trying to open a unix
>> socket with the name /var/run/BackupPC/BackupPC.sock .
>> 
>> There is no directory /var/run/BackupPC/ on my server. When I
>> create this, setting backuppc.apache as owner, and run "sudo
>> systemctl restart backuppc" I see in /var/log/BackupPC/LOG that
>> BackupPC has (at long last) started
>> 
> 
> Seems a packaging issue ? From where is your rpm for backuppc coming ?

>From epel .

> /var/run on EL7 is in fact pointing to /run , which is tmpfs, so
> packages aren't supposed to drop something there directly, or that
> will be gone anyway next time your restart the machine.
> Workaround for those not-yet-fixed-for-systemd-packages : man
> tmpfiles.d (that will create/maintain those)

I don't really understand this.
The perl script wants to create /var/run/BackupPC/BackupPC.sock
which it seems it cannot do unless /var/run/BackupPC/ exists.
If as you say this disappears on re-booting,
I don't see how this program could work.


-- 
Timothy Murphy  
gayleard /at/ eircom.net
School of Mathematics, Trinity College, Dublin