From: Zoltán Felleg Date: Wed, 7 Nov 2018 11:36:40 +0000 (+0100) Subject: Added pns.pm.f29. X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=adc9fe65b4e019c26176249eb9d83fce33d3e697;p=user-lxc.git Added pns.pm.f29. --- diff --git a/sources/pns.pm.f29/config b/sources/pns.pm.f29/config new file mode 100644 index 0000000..5633fc1 --- /dev/null +++ b/sources/pns.pm.f29/config @@ -0,0 +1,19 @@ +lxc.include = /usr/share/lxc/config/common.conf + +lxc.arch = x86_64 +lxc.uts.name = pns.pm.user.hu +lxc.rootfs.path = __CONTAINER_PATH__/rootfs +lxc.mount.auto = proc:rw sys:ro + +lxc.net.0.type = veth +lxc.net.0.flags = up +lxc.net.0.link = brh +lxc.net.0.hwaddr = 02:0c:18:03:ad:ae + +lxc.autodev = 1 + +lxc.signal.halt = SIGRTMIN+4 + +lxc.start.auto = 1 +lxc.start.order = 12 +lxc.start.delay = 10 diff --git a/sources/pns.pm.f29/envvars b/sources/pns.pm.f29/envvars new file mode 100644 index 0000000..225fcb0 --- /dev/null +++ b/sources/pns.pm.f29/envvars @@ -0,0 +1,4 @@ +#BASE_PACKAGES="NetworkManager initscripts openssh-server openssh-clients openssh-ldap rootfiles rsyslog sudo tar vim-minimal" +#SPEC_PACKAGES="authselect bind bind-utils openldap-clients nss-pam-ldapd pam_ssh passwd" +BASE_PACKAGES="NetworkManager initscripts rootfiles rsyslog tar" +SPEC_PACKAGES="bind bind-utils" diff --git a/sources/pns.pm.f29/firstboot/01_setupnetworking.sh b/sources/pns.pm.f29/firstboot/01_setupnetworking.sh new file mode 100755 index 0000000..aeac781 --- /dev/null +++ b/sources/pns.pm.f29/firstboot/01_setupnetworking.sh @@ -0,0 +1,55 @@ +#!/bin/sh + + +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 -ne 0 ] && echo + +CONNECTIONS=$(nmcli connection show | grep -v '^NAME' | wc -l) +if [ $CONNECTIONS -ne 1 ] +then + echo "Number of connections: $CONNECTIONS" >&2 + exit 1 +fi + +CONNECTION_LINE=$(nmcli connection show | grep -v '^NAME') +CONNECTION_TOKENS=$(echo $CONNECTION_LINE | wc -w) +#CONNECTION_NAME_POS=$(( $CONNECTION_TOKENS - 3 )) +CONNECTION_UUID_POS=$(( $CONNECTION_TOKENS - 2 )) +#CONNECTION_TYPE_POS=$(( $CONNECTION_TOKENS - 1 )) +CONNECTION_DEVICE_POS=$CONNECTION_TOKENS +#CONNECTION_NAME=$(echo $CONNECTION_LINE \ +# | cut -f -$CONNECTION_NAME_POS -d ' ') +CONNECTION_UUID=$(echo $CONNECTION_LINE \ + | cut -f $CONNECTION_UUID_POS -d ' ') +#CONNECTION_TYPE=$(echo $CONNECTION_LINE \ +# | cut -f $CONNECTION_TYPE_POS -d ' ') +CONNECTION_DEVICE=$(echo $CONNECTION_LINE \ + | cut -f $CONNECTION_DEVICE_POS -d ' ') + +nmcli connection delete uuid "$CONNECTION_UUID" + +nmcli connection add \ + type 802-3-ethernet \ + ifname $CONNECTION_DEVICE \ + con-name perimeter \ + autoconnect yes \ + save yes \ + ipv4.addresses "192.168.173.174/24" \ + ipv4.dns "127.0.0.1" \ + ipv4.dns-search "pm.user.hu" \ + ipv4.gateway "192.168.173.254" \ + ipv4.method "manual" \ + ipv4.routes "10.228.0.0/16 192.168.173.1" \ + ipv6.method "ignore" +nmcli connection show diff --git a/sources/pns.pm.f29/firstboot/02_settimezone.sh b/sources/pns.pm.f29/firstboot/02_settimezone.sh new file mode 100755 index 0000000..20b2a71 --- /dev/null +++ b/sources/pns.pm.f29/firstboot/02_settimezone.sh @@ -0,0 +1,21 @@ +#!/bin/sh + + +sleep 1 +systemctl --quiet is-active dbus.service +DBUS_RC=$? +WAITED=0 +while [ $DBUS_RC -ne 0 ] +do + if [ $WAITED -eq 0 ] + then + echo -n "Waiting for dbus.service" + fi + echo -n . + sleep 1 + WAITED=1 + systemctl --quiet is-active dbus.service + DBUS_RC=$? +done +[ $WAITED -ne 0 ] && echo +timedatectl set-timezone Europe/Budapest diff --git a/sources/pns.pm.f29/firstboot/03_setupldap.sh b/sources/pns.pm.f29/firstboot/03_setupldap.sh new file mode 100755 index 0000000..4b58626 --- /dev/null +++ b/sources/pns.pm.f29/firstboot/03_setupldap.sh @@ -0,0 +1,10 @@ +#!/bin/sh + + +exit 0 +authselect select sssd with-mkhomedir --force + +cat >>/etc/openldap/ldap.conf <