• Jason St. John's avatar
    scripts: Make poff ignore extra arguments to pppd · 18f515f3
    Jason St. John authored
    This allows /usr/bin/poff to properly end a /usr/sbin/pppd process
    that was started with additional arguments.
    
    The problem with the current poff script is on line 93 where the
    output of `ps axw` is piped into grep. The current regular expression
    that grep searches for prevents the PID of the specified pppd process
    from being found, which results in the script failing to terminate the
    pppd process. The output of poff in that case would be the following:
    
    /usr/bin/poff: I could not find a pppd process for provider 'cit-vpn'.
    None stopped.
    
    The reason for this is that the " *\$" at the end of the regular
    expression does not match the output of the following example from `ps
    axw`:
    
    11846 ?        Ss     0:00 /usr/sbin/pppd call cit-vpn updetach persist
    
    To resolve this issue, I removed the troublesome part of the regular
    expression (" *\$") and now grep can properly match the example output
    provided above.
    
    I have tested this using ppp 2.4.5-2 in conjunction with
    pptpclient-1.7.2-3 on Arch Linux x86_64.
    Signed-off-by: 's avatarPaul Mackerras <paulus@samba.org>
    18f515f3
Name
Last commit
Last update
..
chatchat Loading commit data...
README Loading commit data...
autopppd Loading commit data...
callback Loading commit data...
chat-callback Loading commit data...
ip-down.local.add Loading commit data...
ip-up.local.add Loading commit data...
ipv6-down.sample Loading commit data...
ipv6-up.sample Loading commit data...
options-rsh-loc Loading commit data...
options-rsh-rem Loading commit data...
options-ssh-loc Loading commit data...
options-ssh-rem Loading commit data...
plog Loading commit data...
poff Loading commit data...
pon Loading commit data...
pon.1 Loading commit data...
ppp-off Loading commit data...
ppp-on Loading commit data...
ppp-on-dialer Loading commit data...
ppp-on-rsh Loading commit data...
ppp-on-ssh Loading commit data...
redialer Loading commit data...
secure-card Loading commit data...