HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Do package control scripts necessarily have to be ...
Operating System - HP-UX
1834234
Members
2408
Online
110066
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
Forums
Discussions
Discussions
Discussions
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
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
07-04-2002 01:49 AM
07-04-2002 01:49 AM
Do package control scripts necessarily have to be shell scripts?
Hi,
I'm fiddling a bit with the package control scripts of our toy cluster.
Doing this, I've come to the conclusion that being forced (by whom?) to resort to HP-UX's standard shell (or any) is obnoxoius.
See my attachment as a deterrent example of adding most essential functionality to the
/etc/cmcluster//.cntl
script in a very clumsy way.
Here I just want to define a few more variables that I could use in the
customer_defined_(run|halt)_commands functions by calling this init() function.
How easy and efficiently could such a simple task be done in Perl.
Thus I would wish I could replace all of the packages' control scripts by custom Perl scripts.
Is SG-wise anything opposing to my wish.
I guess a lot of variables will have to be exported, as the control scripts seem to be sourced by the cm(run|halt)pkg processes at package start and halt.
Suggestions are welcome.
I'm fiddling a bit with the package control scripts of our toy cluster.
Doing this, I've come to the conclusion that being forced (by whom?) to resort to HP-UX's standard shell (or any) is obnoxoius.
See my attachment as a deterrent example of adding most essential functionality to the
/etc/cmcluster/
script in a very clumsy way.
Here I just want to define a few more variables that I could use in the
customer_defined_(run|halt)_commands functions by calling this init() function.
How easy and efficiently could such a simple task be done in Perl.
Thus I would wish I could replace all of the packages' control scripts by custom Perl scripts.
Is SG-wise anything opposing to my wish.
I guess a lot of variables will have to be exported, as the control scripts seem to be sourced by the cm(run|halt)pkg processes at package start and halt.
Suggestions are welcome.
Madness, thy name is system administration
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2002 02:12 AM
07-04-2002 02:12 AM
Re: Do package control scripts necessarily have to be shell scripts?
Hi Ralph,
I dont know anyone who has tried/done this before but I dont see why you cant use perl. All you have to do, as you said, is handle all the variable assignments and ensure error checking is the same as for a shell script (a call to a script returning 0/1 - your perl program will need to do the same).
As long as you test its lots I dont see why it wont work.
I dont know anyone who has tried/done this before but I dont see why you cant use perl. All you have to do, as you said, is handle all the variable assignments and ensure error checking is the same as for a shell script (a call to a script returning 0/1 - your perl program will need to do the same).
As long as you test its lots I dont see why it wont work.
Im from Palmerston North, New Zealand, but somehow ended up in London...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2002 03:26 AM
07-04-2002 03:26 AM
Re: Do package control scripts necessarily have to be shell scripts?
Ralph,
I don't like fiddling with the basic structure of a package control file, mainly because these *do* get changed in newer releases of ServiceGuard, and who am I to say whether these changes are not reflected by logic changes in the ServiceGuard binaries.
What I always do is have my customer_defined_(run|halt)_commands as a one liner which calls a seperate script - this seperate script can be anything I like, be it shell, perl or even a compiled C program - as long as it returns 0 on success it doesn't matter what it is. - for example:
customer_defined_run_commands()
{
start_db.pl
test_return 51
}
customer_defined_halt_commands()
{
stop_db.pl
test_return 52
}
Then all you clever code can get tucked away in your own seperate scripts without upsetting ServiceGuard.
Is there a reason this approach won't work for you?
Duncan
I am an HPE Employee
I don't like fiddling with the basic structure of a package control file, mainly because these *do* get changed in newer releases of ServiceGuard, and who am I to say whether these changes are not reflected by logic changes in the ServiceGuard binaries.
What I always do is have my customer_defined_(run|halt)_commands as a one liner which calls a seperate script - this seperate script can be anything I like, be it shell, perl or even a compiled C program - as long as it returns 0 on success it doesn't matter what it is. - for example:
customer_defined_run_commands()
{
start_db.pl
test_return 51
}
customer_defined_halt_commands()
{
stop_db.pl
test_return 52
}
Then all you clever code can get tucked away in your own seperate scripts without upsetting ServiceGuard.
Is there a reason this approach won't work for you?
Duncan
I am an HPE Employee

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.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP