--- /dev/null
+#!/bin/sh
+
+
+export PAGER=
+
+
+sleep 1
+systemctl --quiet is-active NetworkManager.service
+NM_RC=$?
+CYCLES_WAITED=0
+while [ $NM_RC -ne 0 ]
+do
+ if [ $CYCLES_WAITED -ge 10 ]
+ then
+ exit 1
+ fi
+ if [ $CYCLES_WAITED -eq 0 ]
+ then
+ echo -n "Waiting for NetworkManager"
+ fi
+ echo -n .
+ sleep 1
+ CYCLES_WAITED=$(( $CYCLES_WAITED + 1 ))
+ systemctl --quiet is-active NetworkManager.service
+ NM_RC=$?
+done
+[ $CYCLES_WAITED -gt 0 ] && echo
+
+# wait for the two network connections to come up
+CONNECTION_DEVICES_UP=$(nmcli --terse connection show \
+ | grep --invert-match ':$' | wc -l)
+CYCLES_WAITED=0
+while [ $CONNECTION_DEVICES_UP -lt 2 ]
+do
+ if [ $CYCLES_WAITED -ge 10 ]
+ then
+ nmcli connection show
+ exit 1
+ fi
+ if [ $CYCLES_WAITED -eq 0 ]
+ then
+ echo -n "Waiting for the network connection"
+ fi
+ echo -n .
+ sleep 1
+ CYCLES_WAITED=$(( $CYCLES_WAITED + 1 ))
+ CONNECTION_DEVICES_UP=$(nmcli --terse connection show \
+ | grep --invert-match ':$' | wc -l)
+done
+[ $CYCLES_WAITED -gt 0 ] && echo
+
+CONNECTIONS=$(nmcli --terse connection show | wc -l)
+if [ $CONNECTIONS -ne 2 ]
+then
+ echo "Number of connections: $CONNECTIONS instead of 2" >&2
+ exit 1
+fi
+
+CONNECTION_LINE=$(nmcli --terse connection show | grep ':eth0$')
+CONNECTION_UUID=$(echo $CONNECTION_LINE | cut -f 2 -d ':')
+CONNECTION_DEVICE=$(echo $CONNECTION_LINE | cut -f 4 -d ':')
+
+nmcli connection delete uuid "$CONNECTION_UUID"
+
+nmcli connection add \
+ connection.autoconnect yes \
+ connection.id internal \
+ connection.interface-name $CONNECTION_DEVICE \
+ connection.type 802-3-ethernet \
+ ipv4.addresses "10.228.109.77/16" \
+ ipv4.dns "10.228.109.159, 10.228.92.159" \
+ ipv4.dns-search "in.useribm.hu" \
+ ipv4.gateway "10.228.109.254" \
+ ipv4.method "manual" \
+ ipv6.addresses "2a02:d400:0000:f268:000c:18ff:fe03:6d4d/64" \
+ ipv6.dns "2a02:d400:0000:f268:000c:18ff:fe03:6d9f, 2a02:d400:0000:f268:000c:18ff:fe03:5c9f" \
+ ipv6.dns-search "in.useribm.hu" \
+ ipv6.gateway "2a02:d400:0000:f268:000c:18ff:fe03:6dfe" \
+ ipv6.method "manual" \
+ save yes
+
+nmcli connection show
+
+hostnamectl hostname log.in.useribm.hu
+hostnamectl
-/var/log/remote/everything.log
-{
+/var/log/remote/*.log {
rotate -1
daily
missingok
--- /dev/null
+template(name="remoteTemplate" type="list") {
+ constant(value="/var/log/remote/")
+ property(name="hostname")
+ constant(value=".log")
+}
+
+module(load="imtcp")
+module(load="imudp")
+
+ruleset(name="remoteRuleset"){
+ *.* action(type="omfile" DynaFile="remoteTemplate")
+}
+
+input(type="imtcp" port="514" ruleset="remoteRuleset")
+input(type="imudp" port="514" ruleset="remoteRuleset")
lxc.net.0.type = veth
lxc.net.0.flags = up
lxc.net.0.link = brci-dev
-lxc.net.0.hwaddr = 02:0c:18:03:6d:8b
+lxc.net.0.hwaddr = 02:0c:18:03:6d:4d
lxc.autodev = 1
+++ /dev/null
-#!/bin/sh
-
-
-export PAGER=
-
-
-sleep 1
-systemctl --quiet is-active NetworkManager.service
-NM_RC=$?
-WAITED=0
-while [ $NM_RC -ne 0 ]
-do
- echo -n .
- sleep 1
- WAITED=1
- systemctl --quiet is-active NetworkManager.service
- NM_RC=$?
-done
-[ $WAITED -eq 1 ] && echo
-
-CONNECTIONS=$(nmcli --terse connection show | wc -l)
-while [ $CONNECTIONS -ne 1 ]
-do
- echo "Number of connections: $CONNECTIONS" >&2
- sleep 1
- CONNECTIONS=$(nmcli --terse connection show | wc -l)
-done
-
-nmcli --terse connection show | grep ':$' >/dev/null
-ALL_CONNECTION_DEVICES_KNOWN=$?
-while [ $ALL_CONNECTION_DEVICES_KNOWN -eq 0 ]
-do
- echo "Not all connection devices are known yet" >&2
- sleep 1
- nmcli --terse connection show | grep ':$' >/dev/null
- ALL_CONNECTION_DEVICES_KNOWN=$?
-done
-
-CONNECTION_LINE=$(nmcli --terse connection show)
-CONNECTION_UUID=$(echo $CONNECTION_LINE | cut -f 2 -d ':')
-CONNECTION_DEVICE=$(echo $CONNECTION_LINE | cut -f 4 -d ':')
-
-nmcli connection add \
- connection.autoconnect yes \
- connection.id internal \
- connection.interface-name $CONNECTION_DEVICE \
- connection.type 802-3-ethernet \
- ipv4.addresses "10.228.109.139/16" \
- ipv4.dns "10.228.109.159, 10.228.92.159" \
- ipv4.dns-search "in.useribm.hu" \
- ipv4.gateway "10.228.109.254" \
- ipv4.method "manual" \
- ipv6.addresses "2a02:d400:0000:f268:000c:18ff:fe03:6d8b/64" \
- ipv6.dns "2a02:d400:0000:f268:000c:18ff:fe03:6d9f, 2a02:d400:0000:f268:000c:18ff:fe03:5c9f" \
- ipv6.dns-search "in.useribm.hu" \
- ipv6.gateway "2a02:d400:0000:f268:000c:18ff:fe03:6dfe" \
- ipv6.method "manual" \
- save yes
-
-nmcli connection delete uuid "$CONNECTION_UUID"
-
-nmcli connection show
+++ /dev/null
-#!/bin/sh
-
-
-sed --in-place=.orig \
- -e 's/^#module(load="imudp")/module(load="imudp")/' \
- -e 's/^#input(type="imudp" port="514")/input(type="imudp" port="514")/' \
- -e 's/^#module(load="imtcp")/module(load="imtcp")/' \
- -e 's/^#input(type="imtcp" port="514")/input(type="imtcp" port="514")/' \
- /etc/rsyslog.conf
-
-echo >>/etc/rsyslog.conf
-echo "*.* /var/log/remote/everything.log" >>/etc/rsyslog.conf