[Xorp-hackers] [PATCH 1/1] xorp_install.bash fix

Ben Greear greearb at candelatech.com
Wed Oct 5 17:14:58 PDT 2011


On 09/27/2011 04:29 AM, Igor Maravic wrote:
> Signed-off-by: Igor Maravic<igorm at etf.rs>
> ---
> :100644 100644 cf23c47... e1d52bb... M	xorp/xorp_install.bash
>   xorp/xorp_install.bash |   15 ++++++++++++++-
>   1 files changed, 14 insertions(+), 1 deletions(-)
>
> diff --git a/xorp/xorp_install.bash b/xorp/xorp_install.bash
> index cf23c47..e1d52bb 100644
> --- a/xorp/xorp_install.bash
> +++ b/xorp/xorp_install.bash
> @@ -18,8 +18,21 @@ if [ `pwd` != "/usr/local/xorp" ]
>   fi
>
>   # Add xorp user and group
> +
> +#Check for adduser commands
> +adduserArgs=""
> +if adduser -h | grep ".--system">  /dev/null 2>&1
> +then
> +        adduserArgs="$adduserArgs --system"
> +fi

We noticed some errors when testing this.  Basically, the -h option
seems to throw output to STDERR instead of STDOUT (on Fedora 14, 15) at
least.

This seems to work for me:

[root at lec2010-ath9k-1 xorp]# adduser -h 2>&1| grep ".--system"
   -r, --system                  create a system account
[root at lec2010-ath9k-1 xorp]# echo $?
0

Can you test your system to

1)  Check that the current script actually works OK on your system(s)

2)  See if my modification works on your system.

Thanks,
Ben


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-hackers mailing list