ping: patch: rc(8) pass args to rc.local(8)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

ping: patch: rc(8) pass args to rc.local(8)

zeurkous
[not subscribed, please Cc, thanks]

This issue still affects 6.5. Not sure whether you folks would find it
worth committing, but me's sure that it doesn't just affect me, so
merespectfully requests a commit.

        --zeur.

> rc(8) does not pass its arguments to rc.local(8); this makes the latter
> unable to check for the 'autoboot' or 'shutdown' args.
>
> Patch below fixes this by simply passing the arguments.
>
>         --zeurkous.
>
> Index: src/etc/rc
> ===================================================================
> RCS file: /cvs/src/etc/rc,v
> retrieving revision 1.529
> diff -u -p -r1.529 rc
> --- src/etc/rc 23 Jul 2018 11:54:49 -0000 1.529
> +++ src/etc/rc 25 Dec 2018 00:59:55 -0000
> @@ -603,7 +603,7 @@ if [[ -n $pkg_scripts ]]; then
>   echo '.'
>  fi
>  
> -[[ -f /etc/rc.local ]] && sh /etc/rc.local
> +[[ -f /etc/rc.local ]] && sh /etc/rc.local "${@}"
>  
>  # Disable carp interlock.
>  ifconfig -g carp -carpdemote 128

--
Friggin' Machines!