Re: setup-ds-admin.pl failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/30/2013 01:21 AM, Carsten Grzemba wrote:


Am 29.01.13 schrieb Rich Megginson <rmeggins@xxxxxxxxxx>:

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?

I see another error on this line - should be $ENV{"USER"}

We could do a conditional build for Solaris e.g. something like this:
$userEnvVar = "USER";
if (@solaris@) { $userEnvVar = "LOGNAME"; }
...
sub getLogin {
    return (getpwuid($>))[0] || $ENV{$userEnvVar} || confess "Error: could not determine the current user ID: $!";



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@xxxxxxxxxxx:



--
389 users mailing list
389-users@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/389-users

--
389 users mailing list
389-users@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/389-users

[Index of Archives]     [Fedora User Discussion]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora News]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora QA]     [Fedora Triage]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Yosemite Photos]     [Linux Apps]     [Maemo Users]     [Gnome Users]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Maemo Users]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Fedora ARM]

  Powered by Linux