From: Zoltán Felleg Date: Fri, 11 Feb 2022 14:09:40 +0000 (+0100) Subject: Updated dhcp.in (converted to the new c3d format). X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=373680ba0fda50fee1b2ffb7d2461862fc4bc2e5;p=user-lxc.git Updated dhcp.in (converted to the new c3d format). --- diff --git a/scripts/poweroffall.sh b/scripts/poweroffall.sh new file mode 100755 index 0000000..9af2adb --- /dev/null +++ b/scripts/poweroffall.sh @@ -0,0 +1,8 @@ +#!/bin/sh + + +lxc-ls -1 --running | while read CONTAINER +do + echo "Powering off $CONTAINER" + lxc-attach --name $CONTAINER -- poweroff +done diff --git a/sources/dhcp.in/firstboot/01_setupnetworking.sh b/sources/dhcp.in/c3d/firstboot/scripts/01_setupnetworking.sh similarity index 100% rename from sources/dhcp.in/firstboot/01_setupnetworking.sh rename to sources/dhcp.in/c3d/firstboot/scripts/01_setupnetworking.sh index 3eb9687..d265b54 100755 --- a/sources/dhcp.in/firstboot/01_setupnetworking.sh +++ b/sources/dhcp.in/c3d/firstboot/scripts/01_setupnetworking.sh @@ -37,8 +37,6 @@ 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 delete uuid "$CONNECTION_UUID" - nmcli connection add \ connection.autoconnect yes \ connection.id internal \ @@ -52,4 +50,6 @@ nmcli connection add \ ipv6.method "disabled" \ save yes +nmcli connection delete uuid "$CONNECTION_UUID" + nmcli connection show diff --git a/sources/dhcp.in/firstboot/02_settimezone.sh b/sources/dhcp.in/c3d/firstboot/scripts/02_settimezone.sh similarity index 100% rename from sources/dhcp.in/firstboot/02_settimezone.sh rename to sources/dhcp.in/c3d/firstboot/scripts/02_settimezone.sh diff --git a/sources/dhcp.in/firstboot/90_setupservices.sh b/sources/dhcp.in/c3d/firstboot/scripts/90_setupservices.sh similarity index 100% rename from sources/dhcp.in/firstboot/90_setupservices.sh rename to sources/dhcp.in/c3d/firstboot/scripts/90_setupservices.sh diff --git a/sources/dhcp.in/c3d/mode.txt b/sources/dhcp.in/c3d/mode.txt new file mode 100644 index 0000000..d0ff0b1 --- /dev/null +++ b/sources/dhcp.in/c3d/mode.txt @@ -0,0 +1,3 @@ +# mode file (relative to /c3d) +755 firstboot/scripts/*.sh +755 postinstall/scripts/*.sh diff --git a/sources/dhcp.in/postinstall/install/etc/dhcp/dhcpd.conf b/sources/dhcp.in/c3d/postinstall/install-data/etc/dhcp/dhcpd.conf similarity index 100% rename from sources/dhcp.in/postinstall/install/etc/dhcp/dhcpd.conf rename to sources/dhcp.in/c3d/postinstall/install-data/etc/dhcp/dhcpd.conf diff --git a/sources/dhcp.in/postinstall/10_setupservices.sh b/sources/dhcp.in/c3d/postinstall/scripts/10_setupservices.sh similarity index 100% rename from sources/dhcp.in/postinstall/10_setupservices.sh rename to sources/dhcp.in/c3d/postinstall/scripts/10_setupservices.sh diff --git a/sources/dhcp.in/firstboot/99_cleanup.sh b/sources/dhcp.in/firstboot/99_cleanup.sh deleted file mode 100755 index b87f2f4..0000000 --- a/sources/dhcp.in/firstboot/99_cleanup.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - - -REAL_PATH=$(dirname $(realpath $0)) - -echo rm -Rf $REAL_PATH diff --git a/sources/dhcp.in/postinstall/01_setownership.sh b/sources/dhcp.in/postinstall/01_setownership.sh deleted file mode 100755 index f2e6b94..0000000 --- a/sources/dhcp.in/postinstall/01_setownership.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - - -REAL_PATH=$(dirname $(realpath $0)) -SOURCE_PATH=$REAL_PATH/install - -chown -R root.root $SOURCE_PATH/* diff --git a/sources/dhcp.in/postinstall/02_setpermissions.sh b/sources/dhcp.in/postinstall/02_setpermissions.sh deleted file mode 100755 index 241386a..0000000 --- a/sources/dhcp.in/postinstall/02_setpermissions.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - - -REAL_PATH=$(dirname $(realpath $0)) -SOURCE_PATH=$REAL_PATH/install diff --git a/sources/dhcp.in/postinstall/03_installfiles.sh b/sources/dhcp.in/postinstall/03_installfiles.sh deleted file mode 100755 index e4ee7ff..0000000 --- a/sources/dhcp.in/postinstall/03_installfiles.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - - -REAL_PATH=$(dirname $(realpath $0)) - -tar --create \ - --directory=$REAL_PATH \ - --exclude=.placeholder \ - --to-stdout \ - install \ - | tar --extract \ - --backup \ - --directory=/ \ - --no-overwrite-dir \ - --strip-components=1 \ - --suffix=.orig diff --git a/sources/dhcp.in/postinstall/99_cleanup.sh b/sources/dhcp.in/postinstall/99_cleanup.sh deleted file mode 100755 index b87f2f4..0000000 --- a/sources/dhcp.in/postinstall/99_cleanup.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - - -REAL_PATH=$(dirname $(realpath $0)) - -echo rm -Rf $REAL_PATH