X-Git-Url: https://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=c5f23e720d6fb6c6acff633437bc500f6ad9cda9;hp=d91089d402d65c114618130d2618e12563243c8d;hb=103ba15615e67b8b391c3239c3b7363470728265;hpb=e3eee61e9009d7243a297487ca12c60c1803714d diff --git a/autoconfig.functions b/autoconfig.functions index d91089d..c5f23e7 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Klaus Knopper , (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Mon Feb 18 13:30:57 CET 2008 [mika] +# Latest change: Sam Mai 17 22:04:08 CEST 2008 [mika] ################################################################################ # {{{ path, variables, signals, umask, zsh @@ -1612,11 +1612,22 @@ config_wondershaper(){ # {{{ syslog-ng config_syslog(){ if checkbootparam "nosyslog"; then - ewarn "Not starting syslog-ng as requested on boot commandline." ; eend 0 + ewarn "Not starting syslog daemon as requested on boot commandline." ; eend 0 else - einfo "Starting syslog-ng in background." - /etc/init.d/syslog-ng start 1>>$DEBUG & - eend 0 + SYSLOGD='' + [ -x /etc/init.d/syslog-ng ] && SYSLOGD='syslog-ng' + [ -x /etc/init.d/rsyslog ] && SYSLOGD='rsyslog' + [ -x /etc/init.d/dsyslog ] && SYSLOGD='dsyslog' + [ -x /etc/init.d/sysklogd ] && SYSLOGD='sysklogd' + [ -x /etc/init.d/inetutils-syslogd ] && SYSLOGD='inetutils-syslogd' + + if [ -z "$SYSLOGD" ] ; then + eerror "No syslog daemon found." ; eend 1 + else + einfo "Starting $SYSLOGD in background." + /etc/init.d/$SYSLOGD start 1>>$DEBUG & + eend 0 + fi fi } # }}} @@ -1906,6 +1917,18 @@ fi } # }}} +# {{{ mypath +config_mypath(){ +if checkbootparam "mypath" ; then + MY_PATH="$(getbootparam 'mypath' 2>>$DEBUG)" + einfo "Bootparameter mypath found, adding ${MY_PATH} to /etc/grml/my_path" + touch /etc/grml/my_path + chmod 644 /etc/grml/my_path + echo "$MY_PATH" >> /etc/grml/my_path ; eend $? +fi +} +# }}} + # {{{ distcc config_distcc(){ if checkbootparam "distcc" ; then