Added rc script for the Validate AuthToken service.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 14 17:41:40 MDT 2006 - jluciani@novell.com
|
||||
|
||||
- Added rc script for Validate AuthToken Service.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 14 09:48:54 MDT 2006 - jluciani@novell.com
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Name: CASA_auth_token_native
|
||||
%define debug_opt ""
|
||||
|
||||
URL: http://www.novell.com/products
|
||||
BuildRequires: CASA-devel apache2-devel expat gcc-c++ glib2-devel krb5-devel libgcc libgssapi libstdc++ libstdc++-devel mono-devel pam-devel pkgconfig update-alternatives java-1_5_0-ibm java-1_5_0-ibm-devel
|
||||
BuildRequires: CASA-devel apache2-devel expat gcc-c++ glib2-devel krb5-devel libgcc libgssapi libstdc++ libstdc++-devel mono-devel pam-devel pkgconfig update-alternatives java-1_5_0-ibm java-1_5_0-ibm-devel java-1_5_0-ibm-alsa sysvinit insserv
|
||||
%define prefix /usr
|
||||
License: LGPL
|
||||
Group: System/Libraries
|
||||
@@ -26,8 +26,10 @@ Release: 1
|
||||
Summary: Novell CASA Authentication Token Libraries
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Requires: expat java-1_5_0-ibm CASA_auth_token_jaas_support
|
||||
Requires: expat binutils java-1_5_0-ibm CASA_auth_token_jaas_support sysvinit insserv
|
||||
PreReq: %fillup_prereq %insserv_prereq
|
||||
PreReq: /usr/bin/awk, /usr/bin/test, /bin/grep, /bin/cat, /usr/bin/install, /bin/pwd
|
||||
PreReq: /usr/sbin/groupadd, /usr/sbin/useradd, /usr/sbin/userdel, /usr/bin/getent
|
||||
|
||||
%description
|
||||
CASA_auth_token is an authentication token infrastructure with support
|
||||
@@ -162,6 +164,7 @@ install -d -m 755 %{buildroot}/var/lib/CASA/authtoken
|
||||
install -d -m 755 %{buildroot}/var/lib/CASA/authtoken/validate
|
||||
install -d -m 755 %{buildroot}/etc/CASA
|
||||
install -d -m 755 %{buildroot}/etc/CASA/authtoken.d
|
||||
install -d -m 755 %{buildroot}/etc/CASA/authtoken.d/validate.d
|
||||
install -d -m 755 %{buildroot}/etc/CASA/authtoken.d/modules.d
|
||||
|
||||
## CASA_auth_token_native ##
|
||||
@@ -182,10 +185,11 @@ ln -sf libcasa_s_ipc.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_s_ipc.so
|
||||
ln -sf libcasa_s_ipc.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_s_ipc.so.1
|
||||
|
||||
# Bins
|
||||
install -m 755 bin/%{cfg}/CasaAuthtokenValidateD %{buildroot}%{prefix}/bin/CasaAuthtokenValidateD
|
||||
install -m 755 bin/%{cfg}/CasaAuthtokenValidateD %{buildroot}%{prefix}/bin/casa_atvd
|
||||
|
||||
# Others
|
||||
install -m 644 server/AuthTokenValidate/idenTokenProviders/casa/linux/CasaIdentityToken.conf %{buildroot}/etc/CASA/authtoken.d/modules.d/CasaIdentityToken.conf
|
||||
install -m 755 server/AuthTokenValidate/Svc/linux/CasaAuthtokenValidateD %{buildroot}/etc/init.d/casa_atvd
|
||||
|
||||
## CASA_auth_token_pam_support ##
|
||||
# Libs
|
||||
@@ -214,24 +218,131 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
## CASA_auth_token_native ##
|
||||
%pre
|
||||
# Nothing to do in this pre script
|
||||
|
||||
# Do necessary user and group administration
|
||||
group_present=`getent group | grep ^casaauth`
|
||||
if [ -z "$group_present" ] ; then
|
||||
/usr/sbin/groupadd -r casaauth
|
||||
fi
|
||||
|
||||
user_present=`getent passwd | grep ^casaatvd`
|
||||
if [ -z "$user_present" ] ; then
|
||||
/usr/sbin/useradd -c "casa_atvd System User" -s /bin/false -r -d /var/lib/CASA/authtoken/validate -g casaauth casaatvd 2> /dev/null || :
|
||||
fi
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
|
||||
CAVD_ETC_DIR=/etc/CASA/authtoken.d/validate.d
|
||||
|
||||
setup_casa_atvd_env()
|
||||
{
|
||||
# Save copy of enviroments file if it already exists
|
||||
if [ -f $CAVD_ETC_DIR/envvars ]; then
|
||||
mv $CAVD_ETC_DIR/envvars $CAVD_ETC_DIR/envvars.bak
|
||||
fi
|
||||
|
||||
# Create envvars file
|
||||
cat > $CAVD_ETC_DIR/envvars <<!
|
||||
############################################################
|
||||
# #
|
||||
# Environment variable file for casa_atvd. #
|
||||
# #
|
||||
# Note: This file is sourced by the casa_atvd rc script #
|
||||
# when starting the service. #
|
||||
# #
|
||||
# The following variables are utilized by the daemon #
|
||||
# and its rc script: #
|
||||
# #
|
||||
# DAEMON_NO_AUTORESTART_AFTER_CRASH - #
|
||||
# #
|
||||
# Set this variable to "1" if you want to disable the #
|
||||
# auto-restart daemon after abnormal termination #
|
||||
# feature. This variable is intended to facilitate #
|
||||
# the discovery of problems during quality assurance #
|
||||
# testing. Disabling of the auto-restart daemon after #
|
||||
# abnormal termination feature will result in a #
|
||||
# configuration that is less fault tolerant. #
|
||||
# #
|
||||
# DAEMON_COREDUMPS_WANTED - #
|
||||
# #
|
||||
# Set this variable to allow core dumps to be taken #
|
||||
# when a daemon terminates abnormally. This variable #
|
||||
# is only meaningful when the auto-restart daemon #
|
||||
# feature mentioned above is enabled. Core dumps are #
|
||||
# allowed to be taken when the auto-restart daemon #
|
||||
# feature is disabled. Core dumps of novell-xsrvd #
|
||||
# service processes are taken to the #
|
||||
# /var/novell/xtier folder. #
|
||||
# #
|
||||
############################################################
|
||||
LD_LIBRARY_PATH="\${LD_LIBRARY_PATH}":/usr/lib/jvm/java-1.5.0-ibm/jre/bin:/usr/lib/jvm/java-1.5.0-ibm/jre/bin/classic
|
||||
export LD_LIBRARY_PATH
|
||||
!
|
||||
chmod +x $CAVD_ETC_DIR/envvars
|
||||
}
|
||||
|
||||
# Do not run the rest of the script if this is an upgrade
|
||||
if test "$1" != 1; then
|
||||
setup_casa_atvd_env
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Create link to init.d script in /usr/sbin
|
||||
if [ -f /usr/sbin/rccasa_atvd ] || [ -L /usr/sbin/rccasa_atvd ]; then
|
||||
rm -f /usr/sbin/rccasa_atvd
|
||||
fi
|
||||
ln -s /etc/init.d/casa_atvd /usr/sbin/rccasa_atvd
|
||||
|
||||
setup_casa_atvd_env
|
||||
|
||||
# Install casa_atvd init script
|
||||
/usr/lib/lsb/install_initd /etc/init.d/casa_atvd
|
||||
|
||||
|
||||
%preun
|
||||
# Nothing to do in this preun script
|
||||
|
||||
# Do not run script if this is an install
|
||||
if test "$1" == 1; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Stop casa_atvd
|
||||
/etc/init.d/casa_atvd stop
|
||||
|
||||
# Remove casa_atvd init script
|
||||
/usr/lib/lsb/remove_initd /etc/init.d/casa_atvd
|
||||
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
|
||||
# We just want to start the casa_atvd service if this is an upgrade
|
||||
if test "$1" == 1; then
|
||||
/etc/init.d/casa_atvd start
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Remove symbolic link to init.d script
|
||||
if [ -f /usr/sbin/rccasa_atvd ] || [ -L /usr/sbin/rccasa_atvd ]; then
|
||||
rm -f /usr/sbin/rccasa_atvd
|
||||
fi
|
||||
|
||||
# Delete the casaatvd user
|
||||
userdel casaatvd
|
||||
|
||||
# Delete the var files
|
||||
rm -rf //var/lib/CASA/authtoken/validate
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%dir /var/lib/CASA
|
||||
%dir /var/lib/CASA/authtoken
|
||||
%dir /var/lib/CASA/authtoken/validate
|
||||
%dir %attr(-, casaatvd, casaauth) /var/lib/CASA/authtoken/validate
|
||||
%dir /etc/CASA
|
||||
%dir /etc/CASA/authtoken.d
|
||||
%dir /etc/CASA/authtoken.d/validate.d
|
||||
%dir /etc/CASA/authtoken.d/modules.d
|
||||
%{prefix}/%{_lib}/libcasa_s_authtoken.so.%{bldno}
|
||||
%{prefix}/%{_lib}/libcasa_s_authtoken.so
|
||||
@@ -245,8 +356,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{prefix}/%{_lib}/libcasa_s_ipc.so.%{bldno}
|
||||
%{prefix}/%{_lib}/libcasa_s_ipc.so
|
||||
%{prefix}/%{_lib}/libcasa_s_ipc.so.1
|
||||
%{prefix}/bin/CasaAuthtokenValidateD
|
||||
%{prefix}/bin/casa_atvd
|
||||
/etc/CASA/authtoken.d/modules.d/CasaIdentityToken.conf
|
||||
/etc/init.d/casa_atvd
|
||||
|
||||
|
||||
## CASA_auth_token_pam_support ##
|
||||
|
||||
Reference in New Issue
Block a user