Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 43499

Summary: function enewuser in nagios-core ebuilds not working
Product: Gentoo Linux Reporter: Julien Allanos (RETIRED) <dju>
Component: New packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---

Description Julien Allanos (RETIRED) gentoo-dev 2004-03-02 12:05:36 UTC
hello,

it seems that the enewuser function, used in nagios-core-1.1-r4 and nagios-core-1.2 ebuilds, doesn't work on my box. i didn't try with other ebuilds but i think they'll do the same.

~$ emerge nagios-core    
Calculating dependencies ...done!
>>> emerge (1 of 1) net-analyzer/nagios-core-1.1-r4 to /
>>> md5 src_uri ;-) nagios-1.1.tar.gz
 * Adding group 'nagios' to your system ...
 *  - Groupid: next available
 * Adding user 'nagios' to your system ...
 *  - Userid: 101
 *  - Shell: /bin/bash
 *  - Home: /dev/null
 * You must add nagios to the system first

!!! ERROR: net-analyzer/nagios-core-1.1-r4 failed.
!!! Function enewuser, Line 575, Exitcode 0
!!! nagios is not a valid GID


here are the interesting lines with debug option turned on:

 * Adding user 'nagios' to your system ...
+ return 0
+ local opts=
+ local euid=-1
+ shift
+ '[' '!' -z -1 ']'
+ '[' -1 '!=' -1 ']'
+ euid=next
+ '[' next == next ']'
++ seq 101 999
++ getent passwd 101
+ '[' -z '' ']'
+ break
+ opts= -u 101
+ einfo ' - Userid: 101'
+ '[' no '!=' yes ']'
+ echo -e ' *  - Userid: 101'
 *  - Userid: 101
+ return 0
+ local eshell=/bin/bash
+ shift
+ '[' '!' -z /bin/bash ']'
+ '[' /bin/bash '!=' -1 ']'
+ '[' '!' -e /bin/bash ']'
+ einfo ' - Shell: /bin/bash'
+ '[' no '!=' yes ']'
+ echo -e ' *  - Shell: /bin/bash'
 *  - Shell: /bin/bash
+ return 0
+ opts= -u 101 -s /bin/bash
+ local ehome=/dev/null
+ shift
+ '[' -z /dev/null ']'
+ einfo ' - Home: /dev/null'
+ '[' no '!=' yes ']'
+ echo -e ' *  - Home: /dev/null'
 *  - Home: /dev/null
+ return 0
+ opts= -u 101 -s /bin/bash -d /dev/null
+ local egroups=nagios
+ shift
+ '[' '!' -z nagios ']'
+ local realgroup=
+ local 'oldifs=        
'
+ export IFS=,
+ IFS=,
+ chgrp nagios
++ ls -l
++ awk '{print $4}'
+ realgroup=
portage
portage
+ '[' nagios '!=' '
portage
portage' ']'
+ eerror 'You must add nagios to the system first'
+ '[' no = yes ']'
+ echo -e ' * You must add nagios to the system first'
 * You must add nagios to the system first
+ esyslog daemon.err rc-scripts 'You must add nagios to the system first'
+ return 0
+ return 0
+ diefunc enewuser 575 0 'nagios is not a valid GID'
+ local funcname=enewuser lineno=575 exitcode=0
+ shift 3
+ echo

+ echo '!!! ERROR: net-analyzer/nagios-core-1.1-r4 failed.'
!!! ERROR: net-analyzer/nagios-core-1.1-r4 failed.
+ echo '!!! Function enewuser, Line 575, Exitcode 0'
!!! Function enewuser, Line 575, Exitcode 0
+ echo '!!! nagios is not a valid GID'
!!! nagios is not a valid GID
+ echo

+ exit 1
Comment 1 SpanKY gentoo-dev 2004-03-02 12:33:41 UTC
make sure your portage tree is up-to-date

*** This bug has been marked as a duplicate of 43278 ***