[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with launching ssh2 through cfengine
From: |
Didier CONTIS |
Subject: |
Problem with launching ssh2 through cfengine |
Date: |
Thu, 7 Dec 2000 12:34:33 -0500 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I am trying to start ssh2 using cfengine.
Below is what I use:
processes:
"sshd2" restart "/etc/rc3.d/S78sshd" useshell=false
However, I am obtaining the following error:
cfengine:yamw2: Executing shell command: /etc/rc3.d/S78sshd start
cfengine:yamw2: Restart: cfengine:yamw2: Executing shell command:
/etc/rc3.d/S78sshd start
cfengine:yamw2: Restart: cfengine:yamw2: Couldn't chdir to sshd2
cfengine:yamw2: Restart: cfengine:yamw2: chdir: No such file or
directory
cfengine:yamw2: Restart: cfengine:yamw2: Process restart execution
failed on /etc/rc3.d/S78sshd start
cfengine:yamw2: Restart: cfengine:yamw2: popen: No such file or
directory
cfengine:yamw2: (Done with /etc/rc3.d/S78sshd start)
Here is the script S78sshd:
===================================================================
#!/sbin/sh
# Copyright 12/24/96 Sun Microsystems, Inc. All Rights Reserved.
#
# Return pid of named process in variable "pid"
#
pidproc() {
pid=`/usr/bin/ps -e |
/usr/bin/grep $1 |
/usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
}
#
# Kill named process(es)
#
killproc() {
pidproc $1
[ "$pid" != "" ] && kill -9 $pid
}
case "$1" in
'start')
if [ -f /usr/local/sbin/sshd2 ]; then
/usr/local/sbin/sshd2
fi
;;
'stop')
killproc sshd2
;;
*)
echo "Usage: /etc/init.d/sshd.dmi { start | stop }"
;;
esac
exit 0
===================================================================
Any idea on this problem. I am especially puzzled by the chdir issue.
Thanks in advance for any help.
Best regards, Didier.
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBOi/KKXqEbTtUcuwQEQKvmgCfcE2euVCegTwCkS6DFVgM6XkvZRoAmwXb
2DjN6AZ6EhPHVigTKUkIzWzc
=fIXS
-----END PGP SIGNATURE-----
- Problem with launching ssh2 through cfengine,
Didier CONTIS <=