Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#20942 - [rsync] --daemon creates its own pid file

Attached to Project: Arch Linux
Opened by Loui Chang (louipc) - Saturday, 25 September 2010, 14:42 GMT
Last edited by Pierre Schmitz (Pierre) - Thursday, 07 June 2012, 06:31 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Pierre Schmitz (Pierre)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

It seems that the latest version of rsync --daemon creates a pid
file on it's own, so this line in /etc/rc.d/rsyncd is redundant,
and may actually cause issues.

pgrep -of "/usr/bin/rsync --daemon" > /var/run/rsyncd.pid
This task depends upon

Closed by  Pierre Schmitz (Pierre)
Thursday, 07 June 2012, 06:31 GMT
Reason for closing:  Not a bug
Comment by Marius (65kid) - Saturday, 06 August 2011, 14:50 GMT
rsync does NOT create its own pid file. This causes "/etc/rc.d/rsyncd stop" to fail. If I uncomment the pgrep line in /etc/rc.d/rsyncd, it works fine.
Comment by Loui Chang (louipc) - Saturday, 06 August 2011, 19:04 GMT
With the default included /etc/rsyncd.conf rsync should create a pid file.
The problem is that if you change it, the rc.d script has no way of knowing.
Comment by Marius (65kid) - Saturday, 06 August 2011, 22:25 GMT
you are right, my bad, my config doesn't contain the "pid file" option. but shouldn't the rc.d script be independent of the config file? I mean my config isn't "broken", so the rc.d script IMHO should work fine regardless...
Comment by Loui Chang (louipc) - Sunday, 07 August 2011, 20:08 GMT
Not sure, the script seems buggy either way. Something for the maintainers to fix.
If the script does want to create its own pid file, it should also remember to remove
it when stopping the service - rsync won't know what the rc.d script is doing.
Comment by Mark (voidzero) - Friday, 09 December 2011, 22:00 GMT
IMO system rc.d files have a higher priority than rsyncd.conf -- but implementing a fallback is easy.
After a valid start ( [[ $? == 0 ]] ) check if the process is indeed running. If there was a valid start, but /var/run/rsyncd.pid is missing, create it.

Here's a patch that proposes a fix for /etc/rc.d/rsyncd.
Comment by Pierre Schmitz (Pierre) - Thursday, 07 June 2012, 06:31 GMT
I'd say: if you change you default config you should know what you are doing and adjust the rc script if needed.

Loading...