maybe chmod 0755 'init.d/udev'
maybe chmod 0644 'init/salt-minion.conf'
maybe chmod 0644 'init/salt-minion.override'
-maybe chmod 0644 'init/ssh.conf'
maybe chmod 0755 'initramfs-tools'
maybe chmod 0755 'initramfs-tools/conf.d'
maybe chmod 0644 'initramfs-tools/conf.d/driver-policy'
([ "$previous" ] && [ "$runlevel" ]) || [ "$runlevel" = S ]
}
-check_for_upstart() {
- if init_is_upstart; then
- exit $1
- fi
-}
-
check_for_no_start() {
# forget it if we're trying to start, and /etc/ssh/sshd_not_to_be_run exists
if [ -e /etc/ssh/sshd_not_to_be_run ]; then
case "$1" in
start)
- check_for_upstart 1
check_privsep_dir
check_for_no_start
check_dev_null
fi
;;
stop)
- check_for_upstart 0
log_daemon_msg "Stopping OpenBSD Secure Shell server" "sshd" || true
if start-stop-daemon --stop --quiet --oknodo --pidfile /run/sshd.pid; then
log_end_msg 0 || true
;;
reload|force-reload)
- check_for_upstart 1
check_for_no_start
check_config
log_daemon_msg "Reloading OpenBSD Secure Shell server's configuration" "sshd" || true
;;
restart)
- check_for_upstart 1
check_privsep_dir
check_config
log_daemon_msg "Restarting OpenBSD Secure Shell server" "sshd" || true
;;
try-restart)
- check_for_upstart 1
check_privsep_dir
check_config
log_daemon_msg "Restarting OpenBSD Secure Shell server" "sshd" || true
;;
status)
- check_for_upstart 1
status_of_proc -p /run/sshd.pid /usr/sbin/sshd sshd && exit 0 || exit $?
;;
+++ /dev/null
-# ssh - OpenBSD Secure Shell server
-#
-# The OpenSSH server provides secure shell access to the system.
-
-description "OpenSSH server"
-
-start on runlevel [2345]
-stop on runlevel [!2345]
-
-respawn
-respawn limit 10 5
-umask 022
-
-env SSH_SIGSTOP=1
-expect stop
-
-# 'sshd -D' leaks stderr and confuses things in conjunction with 'console log'
-console none
-
-pre-start script
- test -x /usr/sbin/sshd || { stop; exit 0; }
- test -e /etc/ssh/sshd_not_to_be_run && { stop; exit 0; }
-
- mkdir -p -m0755 /run/sshd
-end script
-
-# if you used to set SSHD_OPTS in /etc/default/ssh, you can change the
-# 'exec' line here instead
-exec /usr/sbin/sshd -D