Am 29.01.13 schrieb Rich Megginson <rmeggins@redhat.com>:

On 01/29/2013 09:39 AM, Carsten Grzemba wrote:

The problem is that the scripts use a env variable USER which is commonly not set in Solaris (there is LOGNAME common). It try to work arround this by setting this in:

/etc/opt/csw/default/dirsrv


So I guess if USER not set will the perl function (DSutil.pm)

sub getLogin {
    return (getpwuid($>))[0] || $ENV{USER} || confess "Error: could not determine the current user ID: $!";
}

Looks like we have two bugs here:
1) getpwuid does not return the expected value
2) should look for $ENV{LOGNAME} on Solaris in addition to USER

Do we have tickets for these issues?

So far I know: No.
At least the error message should be fixed.
For the LOGNAME vs. USER environment problem I do not know a simple solution:
Should we really evaluate both?

Carsten




not work and than the function (DSCreate.pm)

sub get_initconfigdir {
    # determine initconfig_dir
    if (getLogin eq 'root') {
        return "/etc/opt/csw/default";
    } else {
        return "$ENV{HOME}/.dirsrv";
    }
}
also not return the correct value. I will fix this tomorrow.

~Carsten

Am 29.01.13 schrieb Jovan.VUKOTIC@sungard.com: