- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: custom package control script
Operating System - Linux
1753521
Members
4895
Online
108795
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2005 08:36 PM
тАО06-01-2005 08:36 PM
custom package control script
Hi all!
I am trying to write a package control script for LDAP service. I have defined a service ldap.daemon in ldap.sh using
SERVICE_NAME[0]="ldap.daemon"
SERVICE_CMD[0]="/usr/sbin/slapd -f /mnt/ldap/conf/slapd.conf"
SERVICE_RESTART[0]=""
But my package halts immediately (though slapd daemon still running):
###### Node "a.b.c.hu": Starting package at Thu Jun 2 10:23:59 CEST 2005 ######
Jun 2 10:23:59 - Node "a.b.c.hu": Activating volume group vgldap .
Jun 2 10:23:59 - Node "a.b.c.hu": Checking filesystems:
/dev/vgldap/lvol1
e2fsck 1.32 (09-Nov-2002)
/dev/vgldap/lvol1: clean, 28/122880 files, 9117/245760 blocks
Jun 2 10:23:59 - Node "a.b.c.hu": Mounting /dev/vgldap/lvol1 at /mnt/ldap
Jun 2 10:23:59 - Node "a.b.c.hu": Adding IP address xx.xx.xx.xx to subnet xx.xx.xx.xx
Jun 2 10:23:59 - Node "a.b.c.hu": Starting service ldap.daemon using
"/usr/sbin/slapd -f /mnt/ldap/conf/slapd.conf"
###### Node "a.b.c.hu": Package start completed at Thu Jun 2 10:23:59 CEST 2005 ######
####### Node "a.b.c.hu": Halting package at Thu Jun 2 10:23:59 CEST 2005 #######
Jun 2 10:23:59 - Node "a.b.c.hu": Halting service ldap.daemon
cmhaltserv : Service name ldap.daemon is not running.
Jun 2 10:23:59 - Node "a.b.c.hu": Remove IP address xx.xx.xx.xx from subnet xx.xx.xx.xx
Jun 2 10:23:59 - Node "a.b.c.hu": Unmounting filesystem on /mnt/ldap
Jun 2 10:23:59 - Node "a.b.c.hu": Deactivating volume group vgldap
###### Node "a.b.c.hu": Package halt completed at Thu Jun 2 10:23:59 CEST 2005 ######
Why does my package fails?
Krisztian
I am trying to write a package control script for LDAP service. I have defined a service ldap.daemon in ldap.sh using
SERVICE_NAME[0]="ldap.daemon"
SERVICE_CMD[0]="/usr/sbin/slapd -f /mnt/ldap/conf/slapd.conf"
SERVICE_RESTART[0]=""
But my package halts immediately (though slapd daemon still running):
###### Node "a.b.c.hu": Starting package at Thu Jun 2 10:23:59 CEST 2005 ######
Jun 2 10:23:59 - Node "a.b.c.hu": Activating volume group vgldap .
Jun 2 10:23:59 - Node "a.b.c.hu": Checking filesystems:
/dev/vgldap/lvol1
e2fsck 1.32 (09-Nov-2002)
/dev/vgldap/lvol1: clean, 28/122880 files, 9117/245760 blocks
Jun 2 10:23:59 - Node "a.b.c.hu": Mounting /dev/vgldap/lvol1 at /mnt/ldap
Jun 2 10:23:59 - Node "a.b.c.hu": Adding IP address xx.xx.xx.xx to subnet xx.xx.xx.xx
Jun 2 10:23:59 - Node "a.b.c.hu": Starting service ldap.daemon using
"/usr/sbin/slapd -f /mnt/ldap/conf/slapd.conf"
###### Node "a.b.c.hu": Package start completed at Thu Jun 2 10:23:59 CEST 2005 ######
####### Node "a.b.c.hu": Halting package at Thu Jun 2 10:23:59 CEST 2005 #######
Jun 2 10:23:59 - Node "a.b.c.hu": Halting service ldap.daemon
cmhaltserv : Service name ldap.daemon is not running.
Jun 2 10:23:59 - Node "a.b.c.hu": Remove IP address xx.xx.xx.xx from subnet xx.xx.xx.xx
Jun 2 10:23:59 - Node "a.b.c.hu": Unmounting filesystem on /mnt/ldap
Jun 2 10:23:59 - Node "a.b.c.hu": Deactivating volume group vgldap
###### Node "a.b.c.hu": Package halt completed at Thu Jun 2 10:23:59 CEST 2005 ######
Why does my package fails?
Krisztian
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2005 11:37 PM
тАО06-01-2005 11:37 PM
Re: custom package control script
Firstly, a daemon should never be used as a SERVICE in a package.
Secondly, if you are trying to run LDAP as the application, then this should be started in the customer defined run functions. If you wish to monitor the fact that the daemon is running using a service, then create a shell script that checks the process is still there every x seconds.
And a last comment, many people have been helping you on many questions, but you do not seem to be eager to assign points.
Please consider assigning points to those who take the time to help you in these forums.
Secondly, if you are trying to run LDAP as the application, then this should be started in the customer defined run functions. If you wish to monitor the fact that the daemon is running using a service, then create a shell script that checks the process is still there every x seconds.
And a last comment, many people have been helping you on many questions, but you do not seem to be eager to assign points.
Please consider assigning points to those who take the time to help you in these forums.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2005 12:07 AM
тАО06-07-2005 12:07 AM
Re: custom package control script
You are right. I just found offending to assign low points for the answers did not really help. But I'll do my best.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2005 12:15 AM
тАО06-07-2005 12:15 AM
Re: custom package control script
My solution (pkg.sh):
function customer_defined_run_cmds
{
# ADD customer defined run commands.
: # do nothing instruction, because a function must contain some command.
/usr/sbin/slapd -f /mnt/ldap/conf/slapd.conf -h ldap://example.com/
test_return 51
}
function customer_defined_halt_cmds
{
# ADD customer defined halt commands.
: # do nothing instruction, because a function must contain some command.
kill $(cat /var/run/slapd.pid)
test_return 52
}
I created a monitor script (attached to this post in the hope that it might be useful for someone). It is a modification of hasmb.mon.
function customer_defined_run_cmds
{
# ADD customer defined run commands.
: # do nothing instruction, because a function must contain some command.
/usr/sbin/slapd -f /mnt/ldap/conf/slapd.conf -h ldap://example.com/
test_return 51
}
function customer_defined_halt_cmds
{
# ADD customer defined halt commands.
: # do nothing instruction, because a function must contain some command.
kill $(cat /var/run/slapd.pid)
test_return 52
}
I created a monitor script (attached to this post in the hope that it might be useful for someone). It is a modification of hasmb.mon.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP