[Thread Prev][Thread Next][Thread Index]
Re: CAUTION!!!! Re: SOLARIS 7 start/stop script for PilotManager v1.107
- To: pilotmgr@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: CAUTION!!!! Re: SOLARIS 7 start/stop script for PilotManager v1.107
- From: Jim Koelkebeck <Jim.Koelkebeck@East>
- Date: Fri, 12 Mar 1999 10:24:49 -0500
- Organization: Sun Microsystems, Inc., http://www.sun.com
- References: <199903120737.UAA08096@moa.NewZealand.Sun.COM>
- Reply-to: Jim.Koelkebeck@East
- Sender: owner-pilotmgr@moshpit
Is there some technical reason why the daemon cannot check for itself (lock
file)
when running and avoid such a (forgive me) kludge?
Trevor Pretty - SolNet Technologies - Sun NZ ISO wrote:
>
> OOPS CAUTION!!!!!!
>
> It don't run in /etc/rc3.d as this is run by root and you get file
> permission problems. You may be able to just change the file
> permissions to give root acces but I've moved the script my ~/bin and
> run from my .login.
>
> OK I should have tested it a bit more - SORRY!
>
> Be careful the -daemon also does not like full sync - this caused some grief.
>
> I nearly lost all my dtcm - but I back it up each night and keep two days worth - Phew!
>
> I've called the script Pilot-Deamon in my ~/bin and changed my pm aliases to:-
>
> alias pm 'Pilot-Deamon stop ; /usr/local/pilot/PilotManager'
> alias pm.sync 'Pilot-Deamon stop ; /usr/local/pilot/PilotManager -sync'
> alias pm.install 'Pilot-Deamon stop ; /usr/local/pilot/PilotManager -install $*'
>
> This stops two PilotManagers running by accident. This message stumped me
> for 5 mins "Wrong packet type on queue" after I logged out & in
> when I tried to use the GUI. I then remembered that PilotManger -daemon
> was running because its now in my .login! However I was panicing at the
> time about loosing 10 years of cm appointments and it is getting late
> on a Friday - don't mention the words wife/telephone/when/comming/home :-)
>
> As the instructions say the -daemon option is for advanced users.
>
> I'm off for the weeken now - good luck - don't call me :-)
>
> Rgds
> Trevor
>
> >Date: Fri, 12 Mar 1999 19:31:06 +1300 (NZDT)
> >From: Trevor Pretty - SolNet Technologies - Sun NZ ISO <trevor@xxxxxxxxxxxxxxxxxxxxxxxxx>
> >To: pilotmgr@xxxxxxxxxxxxxxxxxxxx
> >Subject: SOLARIS 7 start/stop script for PilotManager v1.107
> >
> >
> >PilotManager users.
> >
> >I love the new daemon feature of PilotManager v1.107 but did not like the warning about
> running it twice. This Solaris 7 script fixes all that.
> >
> >I've put it in my /etc/rc3.d
> >
> >For those on lesser version of Solaris (or some other UNIX) you will probably have to
> chnage this to use that old grep & awk method or write your own pkill. The new Solaris 7
> pkill and pgrep commands however make these sorts of scripts a much easir job.
> >
> >Share and enjoy.
> >
> >Trevor Pretty
> >
> >BTW If you have no idea what this Email is about just keep pressing that little button
> from the GUI when you are told :-)
> >
> >
> >
> > ------------ code ----------
> >
> >
> >#!/sbin/sh
> >#
> >
> >#set -x
> >
> >PILOT="/usr/local/pilot/"
> >MGR="PilotManager"
> >
> >case "$1" in
> >'start')
> >
> > echo "Killing off all PilotManager Processes"
> > /usr/bin/pkill -9 -f $MGR
> >
> > echo "starting $PILOT/$MGR"
> > if [ -f $PILOT/$MGR ]; then
> > $PILOT/$MGR -daemon
> > fi
> >
> > ;;
> >
> >'stop')
> > echo "Killing off all PilotManager Processes"
> > /usr/bin/pkill -9 -f $MGR
> > ;;
> >
> >*)
> > echo "Usage: $0 { start | stop }"
> > exit 1
> > ;;
> >esac
> >exit 0
> >
> >
> >------------------------------------------------------------------------
> >***********************************************************
> >* This is a public mailing list! *
> >* Please do not publish Sun proprietary information here! *
> >* - - - - - - - - - - - - - - *
> >* http://www.moshpit.org/pilotmgr *
> >***********************************************************
>
> ------------------------------------------------------------------------
> ***********************************************************
> * This is a public mailing list! *
> * Please do not publish Sun proprietary information here! *
> * - - - - - - - - - - - - - - *
> * http://www.moshpit.org/pilotmgr *
> ***********************************************************
begin:vcard
n:Koelkebeck;Jim
tel;pager:800-759-8888 pin 418-0234
tel;fax:703-208-5829
tel;work:703-208-5749
x-mozilla-html:TRUE
url:http://www.sun.com
org:<A Href="http://www.sun.com"><Img Border=0 Src="http://www.sun.com/logos/SunURL.gif"></A>;Computer Systems Division
version:2.1
email;internet:Jim.Koelkebeck@xxxxxxxxxxxx
title:Systems Engineer
adr;quoted-printable:;;7900 Westpark Drive=0D=0ASuite A110;McLean;VA;22102;USA
x-mozilla-cpt:;-20832
fn:Jim Koelkebeck
end:vcard