net-nds/novell-xtier-base: new config system

This commit is contained in:
geos_one 2009-01-20 21:27:36 +00:00
parent b6ba5a2446
commit f8d956d622
5 changed files with 28 additions and 186 deletions

View File

@ -2,6 +2,10 @@
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
# $Header: $ # $Header: $
20 Jan 2009; Mario Fetka <mario.fetka@gmail.com> +files/10_base.sh,
files/novell-xregd20.initd, novell-xtier-base-3.1.6.10.ebuild:
new config system
16 Jan 2009; Mario Fetka <mario.fetka@gmail.com> 16 Jan 2009; Mario Fetka <mario.fetka@gmail.com>
+novell-xtier-base-3.1.6.10.ebuild: +novell-xtier-base-3.1.6.10.ebuild:
Bump and use my rpm5 eclass Bump and use my rpm5 eclass

View File

@ -1,4 +1,5 @@
AUX novell-xregd20.initd 923 RMD160 f5f069c5d24f1fa5a9d4930a5edcfe478018fba0 SHA1 8acbaa2bc89372fdf80dfaf800b2bc21fb6c9191 SHA256 762f2e50f5ef915189cef05b16fa3174f5a5dc36a57aab28183000396fe119a8 AUX 10_base.sh 131 RMD160 26f3bd184d6db31542b96622cdf6712d9b3be782 SHA1 998371426235583474cc6dcdbf288b60af5f5e25 SHA256 8b2bd1f78c1d51ab5ecefcda7e598d333d93a727e752dbb0196cefc1cfe02cf4
AUX novell-xregd20.initd 1141 RMD160 b190671d5c8961c1d6528de852feb25b55e9e47c SHA1 0cee72fc211fc25c86899400fc6b5c76251980b1 SHA256 a1a52c3002e734ea1da4eaa9d981884797547c4dc753f8289110aab19a699698
DIST Novell_Client_11.0-i386-20081003-CD1.iso 10033152 RMD160 fadcd5ad983fd7c7dc103c16dcfe9830cf0cd574 SHA1 358e219ad0bda13bbd4835342f24c1b01c5f1775 SHA256 cc84aab8c954037479ed2fa3616b76de17047341d25a2aa6210ac050023e3c00 DIST Novell_Client_11.0-i386-20081003-CD1.iso 10033152 RMD160 fadcd5ad983fd7c7dc103c16dcfe9830cf0cd574 SHA1 358e219ad0bda13bbd4835342f24c1b01c5f1775 SHA256 cc84aab8c954037479ed2fa3616b76de17047341d25a2aa6210ac050023e3c00
DIST Novell_Client_11.0-x86_64-20081003-CD1.iso 10487808 RMD160 8965da596c4e339ff2b5b8d240f91a478f9ca2d5 SHA1 acb2ef899c9c593e6f16b1226ed68f54e12f7214 SHA256 81c3153f9fa435ab7251694873c9b4083b126ebae544bd30527fb8183e690789 DIST Novell_Client_11.0-x86_64-20081003-CD1.iso 10487808 RMD160 8965da596c4e339ff2b5b8d240f91a478f9ca2d5 SHA1 acb2ef899c9c593e6f16b1226ed68f54e12f7214 SHA256 81c3153f9fa435ab7251694873c9b4083b126ebae544bd30527fb8183e690789
DIST Novell_Client_SLE11-i586-20081218-CD1.iso 8058880 RMD160 4a2a4146e82f0bb6f3f64e47f992fafcd20ce2e4 SHA1 e688c2571d90d5726928ff325e8da274f863d89f SHA256 7c3a6487879ae7846f3859e906e52811321b049667cbb04cb48fac079e6aee2e DIST Novell_Client_SLE11-i586-20081218-CD1.iso 8058880 RMD160 4a2a4146e82f0bb6f3f64e47f992fafcd20ce2e4 SHA1 e688c2571d90d5726928ff325e8da274f863d89f SHA256 7c3a6487879ae7846f3859e906e52811321b049667cbb04cb48fac079e6aee2e
@ -15,9 +16,9 @@ DIST novell-client-2.0-sle10sp1-i386.iso 10866688 RMD160 b478e97de576987b0a3b801
DIST novell-client-2.0-sle10sp1-x86_64.iso 11649024 RMD160 4f3a08e9cfea2b78072ba9114ecf03b44d8da17a SHA1 f1f5c78851a66c963fef02c69d89e86a3ba12d00 SHA256 3b70e2c81ded3916771a22a5c284c0d5ac7b32b8a47207d01350f9f952fd216f DIST novell-client-2.0-sle10sp1-x86_64.iso 11649024 RMD160 4f3a08e9cfea2b78072ba9114ecf03b44d8da17a SHA1 f1f5c78851a66c963fef02c69d89e86a3ba12d00 SHA256 3b70e2c81ded3916771a22a5c284c0d5ac7b32b8a47207d01350f9f952fd216f
EBUILD novell-xtier-base-3.1.5_p46.ebuild 7574 RMD160 1bcb33ddee3a12fc84e74947bbfbeb80265713f4 SHA1 05b63e4bb82acebeb185426c0ab1c3d8bb296288 SHA256 289f05b14c587d110675ba34a228f6a3839db6c65b3391e400b1a969051a5365 EBUILD novell-xtier-base-3.1.5_p46.ebuild 7574 RMD160 1bcb33ddee3a12fc84e74947bbfbeb80265713f4 SHA1 05b63e4bb82acebeb185426c0ab1c3d8bb296288 SHA256 289f05b14c587d110675ba34a228f6a3839db6c65b3391e400b1a969051a5365
EBUILD novell-xtier-base-3.1.6.0.8.ebuild 7640 RMD160 822529a90d48cbe36055b01ab3470497cd4078bb SHA1 0a6ad7b0be0d85559bc3ac71cb15a62132920acc SHA256 46bc360afa53e3d1696c47bb71229e0947d355cff90eb5592dcf98a167071191 EBUILD novell-xtier-base-3.1.6.0.8.ebuild 7640 RMD160 822529a90d48cbe36055b01ab3470497cd4078bb SHA1 0a6ad7b0be0d85559bc3ac71cb15a62132920acc SHA256 46bc360afa53e3d1696c47bb71229e0947d355cff90eb5592dcf98a167071191
EBUILD novell-xtier-base-3.1.6.10.ebuild 12195 RMD160 87eb4a9a2030bf7f6e9485d9e7db5cc4767d3daa SHA1 055538601cce818e4d566b2a627bcb940b2e8566 SHA256 5ecba2ee8d8e9640338ede9e93c73b8fb94feb97170bfac6e42a8eea72de369a EBUILD novell-xtier-base-3.1.6.10.ebuild 3363 RMD160 ed6c4504c5e024a9b4fedbe68c1e604e0be76bd3 SHA1 96db9430c331d9b7d0652c09f1babf8cbe5b9a51 SHA256 e3124cf491a90396f5b726c61975a5a732d509da13f477c38258b7de88273ac2
EBUILD novell-xtier-base-3.1.6.8-r1.ebuild 12131 RMD160 909d3e3b181cfea4a9c5d25fbac1b622a614b6e6 SHA1 7d18db6cf904b43058a0f75332996b08c6e5df77 SHA256 eae19b84f31748706fe836d1726a4c301f3da058fe0c01e98dfec864bca9412f EBUILD novell-xtier-base-3.1.6.8-r1.ebuild 12131 RMD160 909d3e3b181cfea4a9c5d25fbac1b622a614b6e6 SHA1 7d18db6cf904b43058a0f75332996b08c6e5df77 SHA256 eae19b84f31748706fe836d1726a4c301f3da058fe0c01e98dfec864bca9412f
EBUILD novell-xtier-base-3.1.6.8-r2.ebuild 12198 RMD160 19c1b5f5cc04d6124a42280ff71cb77cce0154ca SHA1 c33542049c5d1c8fa7b2ca460600fa1a23d85336 SHA256 8532c0a8ba372e8f3c5c5438c5be51f193bfefe08f3346d62d4a3e9f49dc22e6 EBUILD novell-xtier-base-3.1.6.8-r2.ebuild 12198 RMD160 19c1b5f5cc04d6124a42280ff71cb77cce0154ca SHA1 c33542049c5d1c8fa7b2ca460600fa1a23d85336 SHA256 8532c0a8ba372e8f3c5c5438c5be51f193bfefe08f3346d62d4a3e9f49dc22e6
EBUILD novell-xtier-base-3.1.6.8.ebuild 7666 RMD160 cc1b7516c3dc1acf69062b6c044c18742383f8a9 SHA1 e07459c18ca4b1714b5687aa51a7d6843ba85097 SHA256 a9eb238c359b089fae50a88be2918c9e706f441821c813d6b869db87e155e5e7 EBUILD novell-xtier-base-3.1.6.8.ebuild 7666 RMD160 cc1b7516c3dc1acf69062b6c044c18742383f8a9 SHA1 e07459c18ca4b1714b5687aa51a7d6843ba85097 SHA256 a9eb238c359b089fae50a88be2918c9e706f441821c813d6b869db87e155e5e7
MISC ChangeLog 2709 RMD160 4743f9a9534fb3ce232c1c3554bcd071f1b32a40 SHA1 be78113d7b5cb2e3dc3a5cc034f42947869fba2a SHA256 bc9eadf09d0eb6c8c600a53a9b3828e221d2965961a7fad283cf0bf5b06cea8b MISC ChangeLog 2865 RMD160 a6efe5c16f2050a236fd8a09cace837b2c1fdd6e SHA1 e8c7cd9f1df4f6847aee5e89df503eaa7b84612c SHA256 ee76ffb10a4a10d4d47ebe79d96ac1b67b9adf28ac96b1ffc18387b3c0553749
MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42 MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42

View File

@ -0,0 +1,5 @@
# init xtier registry
einfo "load base registry"
/opt/novell/xtier/bin/regutil -i /etc/opt/novell/xtier/xtier_registry.xml
eend $?

View File

@ -6,13 +6,21 @@ depend() {
} }
checkconfig() { checkconfig() {
if [ ! -e ${NDSD_CONFIGFILE} ] ; then if [ ! -e /var/opt/novell/xtier/xregd/db/xtier_registry.db ] ; then
eerror "Novell eDirectory server has not been configured." einfo "Configuring Novell Xreg Server"
return 1 for sh in /etc/opt/novell/xtier/xregd/init/*.sh ; do
[ -r "$sh" ] && . "$sh"
done
unset sh
else
einfo "Checking xtier DB"
/opt/novell/xtier/bin/regutil -c
eend $?
fi fi
} }
start() { start() {
checkconfig || return 1
# Update the limit parameters # Update the limit parameters
ulimit -c unlimited ulimit -c unlimited
ulimit -f unlimited ulimit -f unlimited

View File

@ -72,6 +72,8 @@ src_install() {
keepdir /etc/opt/novell/xtier/xregd keepdir /etc/opt/novell/xtier/xregd
insinto /etc/opt/novell/xtier/ insinto /etc/opt/novell/xtier/
doins "${WORKDIR}"/${PN}-${MY_PV}/etc/opt/novell/xtier/* doins "${WORKDIR}"/${PN}-${MY_PV}/etc/opt/novell/xtier/*
exeinto /etc/opt/novell/xtier/xregd/init/
doexe "${FILESDIR}"/*.sh
newinitd "${FILESDIR}"/novell-xregd20.initd novell-xregd newinitd "${FILESDIR}"/novell-xregd20.initd novell-xregd
} }
@ -109,185 +111,7 @@ pkg_nofetch() {
} }
pkg_preinst(){ pkg_preinst(){
# ***************************************
# ******* Begin of pre script ***********
# ***************************************
einfo "Running Novell XTier Base pre script..."
# We just want to stop the novell-xregd service and export the XTier registry to a
# temporary file if this is an upgrade.
#if test "$1" != 1; then
# echo " doing rpm upgrade processing"
# if [ "$YAST_IS_RUNNING" != "instsys" ]; then
#echo "Novell XTier Base pre script stoping novell-xregd for upgrade"
/etc/init.d/novell-xregd stop
# fi
# Check if we need to export the XTier registry
# Note: We export the registry at this time to avoid losing its settings in case
# that we have to rebuild the database.
if [ -e "/var/opt/novell/xtier/xregd/db/xtier_registry.db" ]; then
einfo " Exporting XTier Registry to temporary file..."
rm -f /var/opt/novell/xtier/xregd/xtier_registry.xml.export
LD_LIBRARY_PATH=/opt/novell/xtier/lib /opt/novell/xtier/bin/regutil -e /var/opt/novell/xtier/xregd/xtier_registry.xml.export
einfo " done exporting XTier Xml Registry"
else
einfo " Saving Pre-XFlaim registry file for upgrade..."
cp /etc/opt/novell/xtier/xtier_registry.xml /etc/opt/novell/xtier/xtier_registry.xml.upgrade
fi
einfo "done running Novell XTier Base pre script!"
# exit 0
#fi
#echo " doing rpm install processing"
# Do necessary user and group administration
#group_present=`getent group | grep ^novlxtier`
#if [ -z "$group_present" ] ; then
# /usr/sbin/groupadd -r -g 81 novlxtier
#fi
#user_present=`getent passwd | grep ^novlxregd`
#if [ -z "$user_present" ] ; then
# /usr/sbin/useradd -c "Novell XRegD System User" -s /bin/false -r -d /var/opt/novell/xtier/xregd -g novlxtier -u 81 novlxregd 2> /dev/null || :
#fi
enewgroup novlxtier enewgroup novlxtier
enewuser novlxregd -1 -1 /var/opt/novell/xtier/xregd novlxtier enewuser novlxregd -1 -1 /var/opt/novell/xtier/xregd novlxtier
einfo "done running Novell XTier Base pre script!"
# ***************************************
# ******* End of pre script *************
# ***************************************
} }
pkg_postinst(){
# ***************************************
# ******* Begin of post script **********
# ***************************************
einfo "Running Novell XTier Base post script..."
# Check if we need to import the XTier registry
if [ ! -e "/var/opt/novell/xtier/xregd/db/xtier_registry.db" ]; then
einfo " Importing XTier Xml Registry..."
# Import the registry.
# Note: We could be dealing with an upgrade from a Pre-XFlaim registry in which
# case we would have saved the previous registry contents to let us upgrade to XFlaim based
# registry without loosing configuration settings.
if [ -e "/etc/opt/novell/xtier/xtier_registry.xml.upgrade" ]; then
einfo " Using Pre-XFlaim registry file"
LD_LIBRARY_PATH=/opt/novell/xtier/lib /opt/novell/xtier/bin/regutil -i /etc/opt/novell/xtier/xtier_registry.xml.upgrade
rm -f /etc/opt/novell/xtier/xtier_registry.xml.upgrade
# Make registry changes necessary to bring the base registry up to date
LD_LIBRARY_PATH=/opt/novell/xtier/lib /opt/novell/xtier/bin/regutil -v "XTier\Configuration\XSrv\Authentication Domains" "Default Authentication Provider" REG_SZ "{6AC0492F-3EEF-11d3-BBF3-00A0C9EA53EF}"
LD_LIBRARY_PATH=/opt/novell/xtier/lib /opt/novell/xtier/bin/regutil -d "Client\Policies\Network\IP\Address Resolution Providers\Available" "5"
LD_LIBRARY_PATH=/opt/novell/xtier/lib /opt/novell/xtier/bin/regutil -d "Client\Policies\Network\IP\Address Resolution Providers\Configured" "5"
else
einfo " Using newly installed registry file"
LD_LIBRARY_PATH=/opt/novell/xtier/lib /opt/novell/xtier/bin/regutil -i /etc/opt/novell/xtier/xtier_registry.xml
fi
# Make sure that novlxregd has rights to the registry db
chown -R novlxregd:novlxtier /var/opt/novell/xtier/xregd/db/
einfo " done importing XTier Xml Registry"
else
# The XTier registry exists, check its integrity.
LD_LIBRARY_PATH=/opt/novell/xtier/lib /opt/novell/xtier/bin/regutil -c
# if [ "$?" != "0" ]; then
# echo " Existing XTier Registry Db Unsupported or Corrupted"
# echo " Re-installing XTier Registry Db"
# Delete the XFlaim DB files
# rm -f /var/opt/novell/xtier/xregd/db/xtier_registry.rfl/*
# rmdir /var/opt/novell/xtier/xregd/db/xtier_registry.rfl
# rm -f /var/opt/novell/xtier/xregd/db/*
# Import the registry. Use registry file that was exported earlier if present to
# avoid losing configuration settings that may have been made.
if [ -e "/var/opt/novell/xtier/xregd/xtier_registry.xml.export" ]; then
LD_LIBRARY_PATH=/opt/novell/xtier/lib /opt/novell/xtier/bin/regutil -i /var/opt/novell/xtier/xregd/xtier_registry.xml.export
else
einfo " Exported registry file not found"
einfo " Configuration settings stored in the registry after initial install have been lost"
LD_LIBRARY_PATH=/opt/novell/xtier/lib /opt/novell/xtier/bin/regutil -i /etc/opt/novell/xtier/xtier_registry.xml
fi
# Make sure that novlxregd has rights to the registry db
chown -R novlxregd:novlxtier /var/opt/novell/xtier/xregd/db/
einfo " done importing XTier Xml Registry"
# fi
fi
# Make sure that we are not leaving the temporary registry xml file around
rm -f /var/opt/novell/xtier/xregd/xtier_registry.xml.export
# Do not run the rest of the script if this is an upgrade
#if test "$1" != 1; then
# echo " doing rpm upgrade processing"
# echo "done running Novell XTier Base post script!"
# exit 0
#fi
#echo " doing rpm install processing"
# Install XRegD init script
#
# if test -n "$YAST_IS_RUNNING" ; then
# INSSERV_FORCE="-f"
# else
# INSSERV_FORCE=""
# fi
# sbin/insserv $INSSERV_FORCE etc/init.d/novell-xregd
#/usr/lib/lsb/install_initd /etc/init.d/novell-xregd
# Create link to init.d script in /usr/sbin
#if [ -f /usr/sbin/rcnovell-xregd ] || [ -L /usr/sbin/rcnovell-xregd ]; then
# rm -f /usr/sbin/rcnovell-xregd
#fi
#ln -s /etc/init.d/novell-xregd /usr/sbin/rcnovell-xregd
einfo "done running Novell XTier Base post script!"
# ***************************************
# ******* End of post script ************
# ***************************************
}
pkg_prerm(){
# ***************************************
# ******* Begin of pre-remove script ****
# ***************************************
einfo "Running Novell XTier Base preun script ..."
# Do not run script if this is an install
#if test "$1" == 1; then
# echo "done running Novell XTier Base preun script!"
# exit 0
#fi
#echo " doing rpm removal processing"
# Stop novell-xregd
/etc/init.d/novell-xregd stop
# Remove XRegD init script
#/usr/lib/lsb/remove_initd /etc/init.d/novell-xregd
# Check if we need to export the XTier registry
if [ -e "/var/opt/novell/xtier/xregd/db/xtier_registry.db" ]; then
einfo " Exporting XTier Xml Registry..."
rm -f /etc/opt/novell/xtier/xtier_registry.xml.export
LD_LIBRARY_PATH=/opt/novell/xtier/lib /opt/novell/xtier/bin/regutil -e /etc/opt/novell/xtier/xtier_registry.xml.export
einfo " done exporting XTier Xml Registry"
fi
einfo "done running Novell XTier Base preun script!"
# ***************************************
# ******* End of pre-remove script ******
# ***************************************
}
pkg_postrm(){
# ***************************************
# ******* Begin of postun script ********
# ***************************************
einfo "Running Novell XTier Base postun script ..."
# We just want to start the novell-xregd service if this is an upgrade
#if test "$1" == 1; then
# if [ "$YAST_IS_RUNNING" != "instsys" ]; then
# echo " doing rpm upgrade processing"
#echo "Novell XTier Base postun script starting novell-xregd for upgrade"
/etc/init.d/novell-xregd start
# fi
einfo "done running Novell XTier Base postun script!"
# exit 0
#fi
#echo " doing rpm removal processing"
# Remove symbolic link to init.d script
#if [ -f /usr/sbin/rcnovell-xregd ] || [ -L /usr/sbin/rcnovell-xregd ]; then
# rm -f /usr/sbin/rcnovell-xregd
#fi
# Delete the novlxregd user
#userdel novlxregd
# Delete the var files
#rm -rf /var/opt/novell/xtier
#einfo "done running Novell XTier Base postun script!"
# ***************************************
# ******* End of postun script **********
# ***************************************
}