[osiris-devel] Easier RPM Conversation
David M. Fetter
dfetter at pdx.edu
Wed Oct 6 16:47:41 EDT 2004
How about getpwnam instead of cat and grep? I see your install is a
shell script though and this is a c function, though it also exists in
perl. Since most systems have perl installed you could just put a short
perl statement within the install script using getpwnam. That way you
will find the user account no matter what method the system is using for
account management. (perl example:
http://www.wellho.net/resources/ex.php4?item=p214/userinfo)
Another option might be to grep for passwd: in /etc/nsswitch.conf and if
$1 is equal to files then look in /etc/passwd, if it's compat then do
ypmatch username passwd, etc. The perl way would do this work for you
and be shorter to write, but by adding perl into the shell script you
now have two dependencies for install. Either way would fix the problem
though.
On Wed, 2004-10-06 at 12:17, Brian Wotring wrote:
> To the first issue, see my recent post.
>
> As for the NIS user, yes, I believe some change is in order for the
> installer. The installer has a minor bug in that it prompts for
> continuation after it has already tried to create or locate the osiris
> user/group.
>
> Suggestions for checking are welcome, but it seems like one easy
> solution would be to prompt for permission to create a local user or
> not. Admins that have a userbase elsewhere could then opt out.
>
> David M. Fetter wrote:
> > I would like to suggest/comment on two things regarding the tarball.
> >
> > 1. I think that while it's nice to have an rc script included with the
> > tarball, it probably shouldn't be installed automatically. Instead make
> > it so the command "make install rc" be required to install them, but
> > they won't install with just "make install" or "make install all". The
> > problem (and it's only minor because RPM continues on anyway) is that by
> > doing this you get errors when trying to turn it into an rpm such as
> > this:
> >
> > ==> installing rc startup for daemon(s).
> > ./install.sh: /etc/init.d//osirisd.tmp: cannot create
> > ./install.sh: /etc/init.d//osirisd.tmp: cannot open
> > /usr/local/bin/chmod: cannot access `/etc/init.d//osirisd': No such file
> > or directory
> > /usr/local/bin/rm: cannot lstat `/etc/init.d//osirisd.tmp': No such file
> > or directory
> > /usr/local/bin/ln: creating symbolic link `/etc/rc2.d//S95osirisd' to
> > `/etc/init.d//osirisd': Permission denied
> > ./install.sh: /etc/init.d//osirismd.tmp: cannot create
> > ./install.sh: /etc/init.d//osirismd.tmp: cannot open
> > /usr/local/bin/chmod: cannot access `/etc/init.d//osirismd': No such
> > file or directory
> > /usr/local/bin/rm: cannot lstat `/etc/init.d//osirismd.tmp': No such
> > file or directory
> > /usr/local/bin/ln: creating symbolic link `/etc/rc2.d//S95osirismd' to
> > `/etc/init.d//osirismd': Permission denied
> > ==> Skipping permission setting.
> > ==> Skipping post install.
> >
> > 2. It seem that it doesn't detect the user specified if they are in
> > NIS. I would suspect the same is true for ldap. What happens is that
> > even though I have the generic user account existing in NIS, when
> > installing osiris it doesn't see it and tries to create the account in
> > the local files. This should probably have better checking.
> >
> > Otherwise, we're quite pleased with this. It is very simple and does
> > what we need. Thanks.
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > osiris-devel mailing list
> > osiris-devel at lists.shmoo.com
> > https://lists.shmoo.com/mailman/listinfo/osiris-devel
> _______________________________________________
> osiris-devel mailing list
> osiris-devel at lists.shmoo.com
> https://lists.shmoo.com/mailman/listinfo/osiris-devel
--
David M. Fetter - UNIX Systems Administrator
Portland State University - www.oit.pdx.edu
"Only those who attempt the absurd can achieve the impossible."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.shmoo.com/pipermail/osiris-devel/attachments/20041006/71b7be02/attachment.pgp
More information about the osiris-devel
mailing list