diff options
Diffstat (limited to 'system/conserver/config')
-rw-r--r-- | system/conserver/config/conserver.cf | 53 | ||||
-rw-r--r-- | system/conserver/config/conserver.passwd | 5 | ||||
-rw-r--r-- | system/conserver/config/console.cf | 7 | ||||
-rw-r--r-- | system/conserver/config/rc.conserver | 53 |
4 files changed, 118 insertions, 0 deletions
diff --git a/system/conserver/config/conserver.cf b/system/conserver/config/conserver.cf new file mode 100644 index 0000000000..365062c0c9 --- /dev/null +++ b/system/conserver/config/conserver.cf @@ -0,0 +1,53 @@ +# +# Sample conserver.cf file, to give you ideas of what you can do with +# the various configuration items. +# + +### set up global access +default full { + rw *; +} + +### set the defaults for all the consoles +# these get applied before anything else +default * { + # The '&' character is substituted with the console name + logfile /var/consoles/&; + # timestamps every hour with activity and break logging + timestamp 1hab; + # include the 'full' default + include full; + # master server is localhost + master localhost; +} + +### and now some one-off consoles +# we still inherit the '*' default set +# a simple ssh invocation +console ssh { + type exec; + exec ssh localhost; + # provide a 'message-of-the-day' + motd "just a simple ssh to localhost"; +} + +# +# Note: the user running conserver is expected to have 'dialout' group membership +# + +# Local COM2: port +console ttyS1 { + master localhost; + type device; + device /dev/ttyS1; + baud 9600; + parity none; +} + +### list of clients we allow +access * { + trusted 127.0.0.1; + # RFC 1918 + #allowed 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8; +} + diff --git a/system/conserver/config/conserver.passwd b/system/conserver/config/conserver.passwd new file mode 100644 index 0000000000..f0e1200b2a --- /dev/null +++ b/system/conserver/config/conserver.passwd @@ -0,0 +1,5 @@ +# Everyone uses their regular login and password. +# note: the account running conserver needs /etc/shadow privs for this +# +*any*:*passwd* + diff --git a/system/conserver/config/console.cf b/system/conserver/config/console.cf new file mode 100644 index 0000000000..262f6950b5 --- /dev/null +++ b/system/conserver/config/console.cf @@ -0,0 +1,7 @@ +config * { + master localhost; + + # Below are default on some Debian(-derived) systems: + #port 3109; + #sslenabled no; +} diff --git a/system/conserver/config/rc.conserver b/system/conserver/config/rc.conserver new file mode 100644 index 0000000000..715a9663cb --- /dev/null +++ b/system/conserver/config/rc.conserver @@ -0,0 +1,53 @@ +#!/bin/sh +# Start/stop/restart the conserver console server daemon. + +# Start conserver: +conserver_start() { + if [ -x /usr/sbin/conserver -a -d /var/consoles ]; then + echo "Starting conserver: /usr/sbin/conserver -d -v" + /usr/sbin/conserver -d -v + fi +} + +# Stop conserver: +conserver_stop() { + /bin/killall conserver +} + +# Restart conserver: +conserver_restart() { + conserver_stop + /bin/sleep 1 + conserver_start +} + +# Reload conserver: +conserver_reload() { + /bin/killall -HUP conserver +} + +# Reconnect to any consoles that seem down: +conserver_reconnect() { + /bin/killall -USR1 conserver +} + +case "$1" in +'start') + conserver_start + ;; +'stop') + conserver_stop + ;; +'restart') + conserver_restart + ;; +'reload') + conserver_reload + ;; +'reconnect') + conserver_reconnect + ;; +*) + echo "usage $0 start|stop|restart|reload|reconnect" +esac + |