Jeff-
I have an SRPM that I could email you for development purposes.
However, being sensitive to Slim's current release-building system,
modifications of slimserver.spec.build and makerelease.pl in the
subversion tree are probably best to supply. With these, you'll build
an SRPM and then you can change the .spec file to suit your purposes.

I'm thinking slimserver should not have a home directory or a shell, so
I didn't follow your last post. I get the part about the '-m' instead of
'-d', but why not just change the useradd line so that the options are
'-M' (no home directory) rather than '-d %{slimdir}' (to fix bug 3314)
and add '-s /sbin/nologin' (to fix your issue regarding SELinux and the
login shell). Feeling a little dense right now...

Pertinent portions of .spec file (%defines in the first two lines,
source tags, entire install section and pre-install script) follow:

%define prefix /usr/local
%define slimdir %{prefix}/slimserver

<snip>

Source: _SOURCE_
Source1: slimserver.init
Source2: slimserver.config

<snip>

%install
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
mkdir -p $RPM_BUILD_ROOT%{slimdir}
cp -R . $RPM_BUILD_ROOT%{slimdir}
chmod +x $RPM_BUILD_ROOT%{slimdir}/slimserver.pl
install -D -m755 %SOURCE1 $RPM_BUILD_ROOT/etc/rc.d/init.d/slimserver
install -D -m644 %SOURCE2 $RPM_BUILD_ROOT/etc/sysconfig/slimserver
touch $RPM_BUILD_ROOT/etc/slimserver.conf

<snip>

%pre
export SLIMSERVER_USER=slimserver

# Someone might have changed the default.  Lets make sure we use it.
if [ -f /etc/sysconfig/slimserver ]; then
        . /etc/sysconfig/slimserver;
fi

# Add the $SLIMSERVER_USER if there is not one
if [ `grep -c "^$SLIMSERVER_USER:" /etc/passwd` -eq 0 ]; then
        /usr/sbin/groupadd $SLIMSERVER_USER
        /usr/sbin/useradd -c "SlimServer" -g $SLIMSERVER_USER -d %{slimdir}
$SLIMSERVER_USER
fi

<snip>

Comments?
-al


-- 
Al Pacifico
------------------------------------------------------------------------
Al Pacifico's Profile: http://forums.slimdevices.com/member.php?userid=5640
View this thread: http://forums.slimdevices.com/showthread.php?t=23594

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/unix

Reply via email to