diff options
| author | michael | 2013-02-20 19:05:33 +0100 |
|---|---|---|
| committer | michael | 2013-02-20 19:05:33 +0100 |
| commit | 56768840998ed7b98e3b412fae004ba375a64f93 (patch) | |
| tree | 1e963106f0d402f58e1d4c3dbd117969644f33d3 /remote/tools/base | |
| parent | install libkmod from source (diff) | |
| parent | init auto hw config (diff) | |
| download | tm-scripts-56768840998ed7b98e3b412fae004ba375a64f93.tar.gz tm-scripts-56768840998ed7b98e3b412fae004ba375a64f93.tar.xz tm-scripts-56768840998ed7b98e3b412fae004ba375a64f93.zip | |
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
Diffstat (limited to 'remote/tools/base')
| -rw-r--r-- | remote/tools/base/base.conf | 1 | ||||
| -rw-r--r-- | remote/tools/base/data/etc/systemd/system/basic.target.wants/rsyslog.service | 12 | ||||
| -rwxr-xr-x | remote/tools/base/data/etc/udhcpc.openslx.script | 78 |
3 files changed, 90 insertions, 1 deletions
diff --git a/remote/tools/base/base.conf b/remote/tools/base/base.conf index 302904c9..c03579b0 100644 --- a/remote/tools/base/base.conf +++ b/remote/tools/base/base.conf @@ -19,7 +19,6 @@ REQUIRED_BINARIES=" bash modprobe rsyslogd ps - sshd scp ssh" REQUIRED_LIBRARIES=" libcap diff --git a/remote/tools/base/data/etc/systemd/system/basic.target.wants/rsyslog.service b/remote/tools/base/data/etc/systemd/system/basic.target.wants/rsyslog.service new file mode 100644 index 00000000..8e253ee1 --- /dev/null +++ b/remote/tools/base/data/etc/systemd/system/basic.target.wants/rsyslog.service @@ -0,0 +1,12 @@ +[Unit] +Description=System Logging Service +Before=udev.service + +[Service] +ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service +ExecStart=/usr/sbin/rsyslogd -n -c5 +Sockets=syslog.socket +StandardOutput=null + +[Install] +WantedBy=multi-user.target diff --git a/remote/tools/base/data/etc/udhcpc.openslx.script b/remote/tools/base/data/etc/udhcpc.openslx.script new file mode 100755 index 00000000..bff430ef --- /dev/null +++ b/remote/tools/base/data/etc/udhcpc.openslx.script @@ -0,0 +1,78 @@ +#!/bin/bash +# ----------------------------------------------------------------------------- +# +# Copyright (c) 2011 - OpenSLX GmbH +# +# This program is free software distributed under the GPL version 2. +# See http://openslx.org/COPYING +# +# If you have any feedback please consult http://openslx.org/feedback and +# send your suggestions, praise, or complaints to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org/ +# ----------------------------------------------------------------------------- +# +# Mini-Linux Toolkit +# +# ----------------------------------------------------------------------------- + + +RESOLV_CONF="/etc/resolv.conf" +IP_CONF="/tmp/udhcpc_ip_config" + +export PATH=$PATH:/openslx/sbin:/openslx/bin + +case $1 in + bound|renew) + + [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" + [ -n "$subnet" ] && NETMASK="netmask $subnet" + + ip addr add $ip/$(ipcalc -s -p $ip $subnet|sed s/.*=//) dev $interface + ip route add default via $router + + echo "ip=$ip" > $IP_CONF + echo "subnet=$subnet" >> $IP_CONF + echo "broadcast=$broadcast" >> $IP_CONF + echo "gateway=$router" >> $IP_CONF + + # Update resolver configuration file + R="" + [ -n "$domain" ] && R="domain $domain +" + count=1; + for i in $dns; do + echo "$0: Adding DNS $i" + R="${R}nameserver $i +" + count=$((count+1)); + done + + if [ -x /sbin/resolvconf ]; then + echo -n "$R" | resolvconf -a "${interface}.udhcpc" + else + echo -n "$R" > "$RESOLV_CONF" + fi + + # TODO i.e. event trigger + systemctl start nfs-mount.service + + ;; + + deconfig) + + ;; + + leasefail) + echo "$0: Lease failed: $message" + ;; + + nak) + echo "$0: Received a NAK: $message" + ;; + + *) + echo "$0: Unknown udhcpc command: $1"; + exit 1; + ;; +esac |
