- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Startup scripting problem
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
01-22-2004 10:59 PM
01-22-2004 10:59 PM
I have created /sbin/init.d/patrol. I used /sbin/init.d/template to create it, and have attached a copy of the file.
I have a link /sbin/rc3.d/S991patrol, and I have a file /etc/rc.config.d/patrol, that contains the line PATROL_AGENT=1.
The patrol agent doesn't seem to be working during startup, I've checked the permissions, and ownership of all the files.
I can use the scripts to manually start the agent, but I have to export the variable PATROL_AGENT=1 for the script to work.
Can anyone suggest why it's not working?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2004 11:06 PM
01-22-2004 11:06 PM
Re: Startup scripting problem
Do you get the message echo "Starting the patrol agent" when you boot?
I also assume you run, by default, in run level 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2004 11:10 PM
01-22-2004 11:10 PM
Re: Startup scripting problem
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2004 11:11 PM
01-22-2004 11:11 PM
Re: Startup scripting problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2004 11:16 PM
01-22-2004 11:16 PM
Re: Startup scripting problem
Grep on patrol.
You say it starts when using the /sbin/init.d/patrol script? I would expect the typo mark found was also generating an error on the screen.
Regards,
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2004 11:19 PM
01-22-2004 11:19 PM
Re: Startup scripting problem
Too many Marks in this thread! It's getting confusing!
Mark (Syder that is)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 01:07 AM
01-23-2004 01:07 AM
Re: Startup scripting problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 01:59 AM
01-23-2004 01:59 AM
Re: Startup scripting problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 02:25 AM
01-23-2004 02:25 AM
Re: Startup scripting problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 02:31 AM
01-23-2004 02:31 AM
Re: Startup scripting problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 06:27 AM
01-23-2004 06:27 AM
Re: Startup scripting problem
I have been burned by that one in the past.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2004 07:53 PM
01-25-2004 07:53 PM
Re: Startup scripting problem
Let us say your error log is in the /tmp directory and has the imaginative name of error.log (that's what I'd call it anyway!). After every if statement put 2 > /tmp/error.log e.g.
if condition > /dev/null 2>/tmp/error.log
then
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2004 11:31 PM
01-25-2004 11:31 PM
Solution#!/bin/sh
#
# PatrolAgent - PATROL Agent startup script for all shell users.
PATH=${PATH}:/bin
TMP_PATROL=/tmp/patrol3411
export TMP_PATROL
case "$1" in
'start_msg')
echo "Start Patrol Agent version 3.4.11"
;;
'stop_msg')
echo "Stop Patrol Agent"
;;
'start')
BASEPATH=/usr/users/patrol/3.4.11
cd $BASEPATH
. ./patrolrc.sh
if [ ! -d "${HOME-}" ]
then
HOME=$PATROL_HOME
export HOME
if [ ! -d "$HOME" ]
then
mkdir $HOME
fi
fi
PATH=$PATROL_HOME/bin:$PATH
cd $PATROL_HOME/bin
nohup PatrolAgent -p 3182 &
;;
'stop')
pid=`/bin/ps -e | grep PatrolAgent | grep -v grep | sed -e 's/^ *//' -e 's/ .*//' | head -1`
kill -9 $pid
;;
*)
echo "usage: $0 {start|stop}"
;;
esac
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2004 12:00 AM
01-26-2004 12:00 AM
Re: Startup scripting problem
export PATH=/usr/bin
Amd if you know of any Patrol variables, define them too. Now try the script from a shell prompt. To see error messages and scripting problems, use -x as in:
sh -x /sbin/init.d/patrol start
(I assume that you have already tested the 4 parameters: start stop start_msg stop_msg). Now you can see everything as the shell traces execution. You should also look in /eetc/rc.log for the results of all startup scripts. To debug during a real startup, put the command:
set -x
in your startup script at the top. All the trace output will go to /etc/rc.log.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2004 12:56 AM
01-26-2004 12:56 AM
Re: Startup scripting problem
Thanks very much, that script worked great. I'll have a look through and will try and work out what I was missing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2004 05:34 AM
04-05-2004 05:34 AM
Re: Startup scripting problem
HTH,
Chuck Davis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2004 05:48 AM
04-05-2004 05:48 AM
Re: Startup scripting problem
Bill Hassell, sysadmin