[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#701884: kfreebsd: unknown method 'inet6 auto'



Hello,

(Overquoting a bit, as other recipients have fallen out of Cc loop)

On Thu, 28 Feb 2013 10:52:16 -0800
Christoph Egger <christoph@debian.org> wrote:

> Andrew Shadura <bugzilla@tut.by> writes:
> > On Thu, 28 Feb 2013 10:33:08 -0800
> > Christoph Egger <christoph@debian.org> wrote:

> >> > Also, on kfreebsd, are -q and -e valid options to sysctl (not
> >> > sure if it's implemented the same way or is it a BSD-specific
> >> > utility there)?

> >> Both are supported[0], kFreeBSD has a additional -p option that is
> >> supported by a wrapper.
> >
> > Well, that page says things different from procps' sysctl's
> > manpage. Is sysctl a wrapper to provide usual command-line options,
> > when a real sysctl is somewhere under /lib or something?

> Exactly, well for providing -p:

> % cat /sbin/sysctl      
> #!/bin/sh
> set -e
> 
> args=""
> quiet="false"
> use_sysctl_conf=false
> 
> while [ $# -gt 0 ]; do
>   case "$1" in
>     -q) quiet=true ;;
>     -p) use_sysctl_conf=true ;;
>     *)  if [ -n "${args}" ] ; then args="${args} $1" ; else
> args="$1" ; fi ;; esac
>   shift
> done
> 
> if ${quiet} ; then
>   if ${use_sysctl_conf} ; then
>     sed /etc/sysctl.conf -e "s/\( \|\t\)*//g" -e "/^#/d" -e "/^$/d" \
>     | (while read i ; do /lib/freebsd/sysctl ${args} ${i}
>     | >/dev/null ; done)
>   else
>     /lib/freebsd/sysctl ${args} >/dev/null
>   fi
> else
>   if ${use_sysctl_conf} ; then
>     sed /etc/sysctl.conf -e "s/\( \|\t\)*//g" -e "/^#/d" -e "/^$/d" \
>     | (while read i ; do /lib/freebsd/sysctl ${args} ${i} ; done)
>   else
>     exec /lib/freebsd/sysctl ${args}
>   fi
> fi

So, what is better to do: to use the wrapper, or to
call /lib/freebsd/sysctl directly?

-- 
WBR, Andrew

Attachment: signature.asc
Description: PGP signature


Reply to: