From: Zoltán Felleg Date: Tue, 6 Nov 2018 10:27:26 +0000 (+0100) Subject: Added ins.usr.f29. X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=3b505946e05038c9fad3572f90bfaff9b6ef9e4b;p=user-lxc.git Added ins.usr.f29. --- diff --git a/sources/ins.usr.f29/config b/sources/ins.usr.f29/config new file mode 100644 index 0000000..b43dd22 --- /dev/null +++ b/sources/ins.usr.f29/config @@ -0,0 +1,18 @@ +lxc.include = /usr/share/lxc/config/common.conf + +lxc.arch = x86_64 +lxc.uts.name = ins.usr.user.hu +lxc.rootfs.path = __CONTAINER_PATH__/rootfs +lxc.mount.auto = proc:rw sys:ro + +lxc.net.0.type = phys +lxc.net.0.flags = up +lxc.net.0.link = ins + +lxc.autodev = 1 + +lxc.signal.halt = SIGRTMIN+4 + +lxc.start.auto = 1 +lxc.start.order = 11 +lxc.start.delay = 10 diff --git a/sources/ins.usr.f29/envvars b/sources/ins.usr.f29/envvars new file mode 100644 index 0000000..225fcb0 --- /dev/null +++ b/sources/ins.usr.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/ins.usr.f29/firstboot/01_setupnetworking.sh b/sources/ins.usr.f29/firstboot/01_setupnetworking.sh new file mode 100755 index 0000000..f66caeb --- /dev/null +++ b/sources/ins.usr.f29/firstboot/01_setupnetworking.sh @@ -0,0 +1,41 @@ +#!/bin/sh + + +sleep 1 +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 internal \ + autoconnect yes \ + save yes \ + ipv4.addresses "10.228.109.104/16" \ + ipv4.dns "10.228.109.253, 10.228.109.104" \ + ipv4.dns-search "usr.user.hu" \ + ipv4.gateway "10.228.109.254" \ + ipv4.method "manual" \ + ipv6.method "ignore" +nmcli connection show diff --git a/sources/ins.usr.f29/firstboot/02_settimezone.sh b/sources/ins.usr.f29/firstboot/02_settimezone.sh new file mode 100755 index 0000000..20b2a71 --- /dev/null +++ b/sources/ins.usr.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/ins.usr.f29/firstboot/03_setupldap.sh b/sources/ins.usr.f29/firstboot/03_setupldap.sh new file mode 100755 index 0000000..4b58626 --- /dev/null +++ b/sources/ins.usr.f29/firstboot/03_setupldap.sh @@ -0,0 +1,10 @@ +#!/bin/sh + + +exit 0 +authselect select sssd with-mkhomedir --force + +cat >>/etc/openldap/ldap.conf <