Subject: [sup-talk] startup crash

From: [email-masked] (Mack, Daemian)
Date: Mon, 10 Mar 2008 10:01:14 -0400

> > But I'm still curious, why this dependency problem is showing itself

> > in a such odd way ?
> 
> Not sure. Sup generates the default name value using:
> 
>   require 'etc'
>   Etc.getpwnam(ENV["USER"]).gecos.split(/,/).first
> 
> What does that evaluate to on your system?
> 
> Now that actually could evaluate to nil for a variety of 
> reasons, so I've fixed the logic to avoid the crash if so. 
> But I'm not sure why it would be nil due to iconv not being installed.

I was getting the 'no name for account' message recently too, when
setting up a test sup instance to play with the indexing, and wondered
if it might be related to gecos info. 

I've tried the test snippet above on three boxes (Debian Etch, Debian
Sarge, Ubuntu 7.10), and it returns the current username when run under
an existing user account. If I add a test user, and run the snippet as
that user, it returns nil. This is true for all three boxes. I
eventually got around it by hardcoding a dummy account name in
account.rb, as I haven't had time to Do The Right Thing and figure out
why ENV["USER"] isn't getting set for new accounts.

Thanks for sup, incidentally! I'm experimenting with using it to manage
a huge influx of business emails that Outlook makes somewhat annoying.

DJFM
--
Daemian Mack
Configuration Management
Tickets.com
344 W Genesee St
Syracuse NY, 13202
315.479.6663 x476
AIM: daemianmack

---

From: [email-masked] (William Morgan)
Date: Mon, 10 Mar 2008 10:12:45 -0700

Excerpts from Mack, Daemian's message of Mon Mar 10 07:01:14 -0700 2008:
> This is true for all three boxes. I eventually got around it by
> hardcoding a dummy account name in account.rb, as I haven't had time
> to Do The Right Thing and figure out why ENV["USER"] isn't getting set
> for new accounts.

Is it really ENV["USER"], or is it the gecos entry being empty?

At any rate, I think this should also be fixed in the newest git.

-- 
William <wmorgan-sup at masanjin.net>