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

Igor Maravić igorm at etf.rs
Thu Oct 6 04:05:45 PDT 2011


1) The current script works just fine on my system.

2) If your modification is to replace

if adduser -h | grep ".--system" > /dev/null 2>&1

with

if adduser -h 2>&1| grep ".--system" > /dev/null

and

if adduser -h | grep ".--no-create-home" > /dev/null 2>&1

with

if adduser -h 2>&1| grep ".--no-create-home" > /dev/null

then your modification works on my system.

BR
Igor Maravić


2011/10/6 Ben Greear <greearb at candelatech.com>:
> 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