summaryrefslogtreecommitdiff
path: root/modules.d/98syslog/parse-syslog-opts.sh
blob: 0ec3015db359dbc25f04d4824d435037298c201f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
# Parses the syslog commandline options
#
#Bootparameters:
#syslogserver=ip    Where to syslog to
#sysloglevel=level  What level has to be logged
#syslogtype=rsyslog|syslog|syslogng  
#                   Don't auto detect syslog but set it
if getarg rdnetdebug ; then
    exec >/tmp/syslog-parse-opts.$1.$$.out
    exec 2>>/tmp/syslog-parse-opts.$1.$$.out
    set -x
fi

syslogserver=$(getarg syslog)
syslogfilters=$(getargs filter)
syslogtype=$(getarg syslogtype)

[ -n "$syslogserver" ] && echo $syslogserver > /tmp/syslog.server
[ -n "$syslogfilters" ] && echo "$syslogfilters" > /tmp/syslog.filters
[ -n "$syslogtype" ] && echo "$syslogtype" > /tmp/syslog.type