[arch-general] [arch-dev-public] [signoff] openssh 5.4p1-2
Linas
linas_fi at ymail.com
Wed Mar 10 19:26:14 CET 2010
Byron Clark wrote:
>> Unfortunately that only works if there is only one sshd process returned
>> by pidof. Here's the case I'm worried about:
>>
>> /var/run/sshd.pid: 343
>> pidof sshd: 3433
>>
> And the case where add ^$ around the pid breaks:
>
> /var/run/sshd.pid: 343
> pidof sshd: 343 2452 2453
>
Yes of course. I foolishly only thought "how to avoid matching partial
numbers"
despite being aware of the general problem.
What we need are word boundaries: grep -q "\\b$(cat /var/run/sshd.pid)\\b"
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the arch-general
mailing list