summaryrefslogtreecommitdiff
path: root/contrib/hpux
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-09-16 15:39:56 +1100
committerDamien Miller <djm@mindrot.org>2000-09-16 15:39:56 +1100
commit606f880e0fd1a31f5beb3b37ece0c12317a9ed61 (patch)
treeb4afe2d6f8b77d73d309b3ed6ea2b89ad768d820 /contrib/hpux
parente4340be5b3ff16f4d9ba5e3ea7e449dc1b6fa7a8 (diff)
- (djm) Shadow expiry check fix from Pavel Troller <patrol@omni.sinus.cz>
- (djm) Re-enable int64_t types - we need them for sftp - (djm) Use libexecdir from configure , rather than libexecdir/ssh - (djm) Update Redhat SPEC file accordingly - (djm) Add Kevin Steves <stevesk@sweden.hp.com> HP/UX contrib files - (djm) Add Charles Levert <charles@comm.polymtl.ca> getpgrp patch - (djm) Fix password auth on HP/UX 10.20. Patch from Dirk De Wachter <Dirk.DeWachter@rug.ac.be> - (djm) Fixprogs and entropy list fixes from Larry Jones <larry.jones@sdrc.com> - (djm) Fix for SuSE spec file from Takashi YOSHIDA <tyoshida@gemini.rc.kyushu-u.ac.jp>
Diffstat (limited to 'contrib/hpux')
-rw-r--r--contrib/hpux/README19
-rw-r--r--contrib/hpux/sshd5
-rwxr-xr-xcontrib/hpux/sshd.rc90
3 files changed, 114 insertions, 0 deletions
diff --git a/contrib/hpux/README b/contrib/hpux/README
new file mode 100644
index 000000000..edddfc018
--- /dev/null
+++ b/contrib/hpux/README
@@ -0,0 +1,19 @@
1README for OpenSSH HP-UX contrib files
2Kevin Steves <stevesk@sweden.hp.com>
3
4sshd: configuration file for sshd.rc
5sshd.rc: SSH startup script
6
7To install:
8
9o Verify paths in sshd.rc match your local installation
10 (WHAT_PATH and WHAT_PID)
11o Customize sshd if needed (SSHD_ARGS)
12o Install:
13
14 # cp sshd /etc/rc.config.d
15 # chmod 444 /etc/rc.config.d/sshd
16 # cp sshd.rc /sbin/init.d
17 # chmod 555 /sbin/init.d/sshd.rc
18 # ln -s /sbin/init.d/sshd.rc /sbin/rc1.d/K100sshd
19 # ln -s /sbin/init.d/sshd.rc /sbin/rc2.d/S900sshd
diff --git a/contrib/hpux/sshd b/contrib/hpux/sshd
new file mode 100644
index 000000000..8eb5e92a3
--- /dev/null
+++ b/contrib/hpux/sshd
@@ -0,0 +1,5 @@
1# SSHD_START: Set to 1 to start SSH daemon
2# SSHD_ARGS: Command line arguments to pass to sshd
3#
4SSHD_START=1
5SSHD_ARGS=
diff --git a/contrib/hpux/sshd.rc b/contrib/hpux/sshd.rc
new file mode 100755
index 000000000..f9a10999b
--- /dev/null
+++ b/contrib/hpux/sshd.rc
@@ -0,0 +1,90 @@
1#!/sbin/sh
2
3#
4# sshd.rc: SSH daemon start-up and shutdown script
5#
6
7# Allowed exit values:
8# 0 = success; causes "OK" to show up in checklist.
9# 1 = failure; causes "FAIL" to show up in checklist.
10# 2 = skip; causes "N/A" to show up in the checklist.
11# Use this value if execution of this script is overridden
12# by the use of a control variable, or if this script is not
13# appropriate to execute for some other reason.
14# 3 = reboot; causes the system to be rebooted after execution.
15
16# Input and output:
17# stdin is redirected from /dev/null
18#
19# stdout and stderr are redirected to the /etc/rc.log file
20# during checklist mode, or to the console in raw mode.
21
22PATH=/usr/sbin:/usr/bin:/sbin
23export PATH
24
25WHAT='OpenSSH'
26WHAT_PATH=/opt/openssh/sbin/sshd
27WHAT_PID=/var/run/sshd.pid
28WHAT_CONFIG=/etc/rc.config.d/sshd
29
30# NOTE: If your script executes in run state 0 or state 1, then /usr might
31# not be available. Do not attempt to access commands or files in
32# /usr unless your script executes in run state 2 or greater. Other
33# file systems typically not mounted until run state 2 include /var
34# and /opt.
35
36rval=0
37
38# Check the exit value of a command run by this script. If non-zero, the
39# exit code is echoed to the log file and the return value of this script
40# is set to indicate failure.
41
42set_return() {
43 x=$?
44 if [ $x -ne 0 ]; then
45 echo "EXIT CODE: $x"
46 rval=1 # script FAILed
47 fi
48}
49
50case $1 in
51'start_msg')
52 echo "Starting $WHAT"
53 ;;
54
55'stop_msg')
56 echo "Stopping $WHAT"
57 ;;
58
59'start')
60 if [ -f $WHAT_CONFIG ] ; then
61 . $WHAT_CONFIG
62 else
63 echo "ERROR: $WHAT_CONFIG defaults file MISSING"
64 fi
65
66 if [ "$SSHD_START" -eq 1 -a -x "$WHAT_PATH" ]; then
67 $WHAT_PATH $SSHD_ARGS && echo "$WHAT started"
68 set_return
69 else
70 rval=2
71 fi
72 ;;
73
74'stop')
75 if kill `cat $WHAT_PID`; then
76 echo "$WHAT stopped"
77 else
78 rval=1
79 echo "Unable to stop $WHAT"
80 fi
81 set_return
82 ;;
83
84*)
85 echo "usage: $0 {start|stop|start_msg|stop_msg}"
86 rval=1
87 ;;
88esac
89
90exit $rval