- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- at command in rc script with parms
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
02-13-2007 04:16 AM
02-13-2007 04:16 AM
at command in rc script with parms
case $1 in
'start')
su - appuser -c "/bin/at -f /usr/bin/application start now + 5 minutes"
This command fails with the message "bad time specification" I think because it believes the word 'start' should be the time specification. (If I take 'start' out the syntax is OK but obviously this is not what I want).
I can make this work if I make an entirely new script that just does the "/usr/bin/application start" but I an trying to avoid that.
I have tried a hereis document but could not get that to work in a rc script.
Any ideas on how to make this work?
Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2007 04:32 AM
02-13-2007 04:32 AM
Re: at command in rc script with parms
> I can make this work if I make an entirely new script that just does the "/usr/bin/application start" but I an trying to avoid that.
Why? Afterall, a wrapper script is often used to supply default arguments. It's a minor bit of indirection for infrequent use here.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2007 05:03 AM
02-13-2007 05:03 AM
Re: at command in rc script with parms
you can create the temporary script on the fly, including a self-cleanup, if '/usr/bin/application' has execute rights:
case $1 in
'start')
echo "/usr/bin/application start
ret=\$?
rm -f /tmp/start_app$$
exit \$ret" >/tmp/start_app$$
su - appuser -c "/bin/at -f /tmp/start_app$$ now + 5 minutes"
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2007 05:17 PM
02-13-2007 05:17 PM
Re: at command in rc script with parms
Another way is to symlink multiple scripts to one and look at $0 to determine if this is "start" or what.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2007 04:29 AM
02-14-2007 04:29 AM
Re: at command in rc script with parms
Scott