diff --git a/system_files/dx/usr/lib/systemd/system/aurora-dx-groups.service b/system_files/dx/usr/lib/systemd/system/aurora-dx-groups.service deleted file mode 100644 index 3e1ee0a0..00000000 --- a/system_files/dx/usr/lib/systemd/system/aurora-dx-groups.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Add wheel members to docker,and incus-admin groups - -[Service] -Type=oneshot -ExecStart=/usr/libexec/aurora-dx-groups -Restart=on-failure -RestartSec=30 -StartLimitInterval=0 - -[Install] -WantedBy=default.target diff --git a/system_files/dx/usr/libexec/aurora-dx-groups b/system_files/dx/usr/libexec/aurora-dx-groups deleted file mode 100755 index aedea210..00000000 --- a/system_files/dx/usr/libexec/aurora-dx-groups +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash - -# SCRIPT VERSION -GROUP_SETUP_VER=2 -GROUP_SETUP_VER_FILE="/etc/ublue/dx-groups" -GROUP_SETUP_VER_RAN=$(cat "$GROUP_SETUP_VER_FILE") - -# make the directory if it doesn't exist -mkdir -p /etc/ublue - -# Run script if updated -if [[ -f $GROUP_SETUP_VER_FILE && "$GROUP_SETUP_VER" = "$GROUP_SETUP_VER_RAN" ]]; then - echo "Group setup has already run. Exiting..." - exit 0 -fi - -# Function to append a group entry to /etc/group -append_group() { - local group_name="$1" - if ! grep -q "^$group_name:" /etc/group; then - echo "Appending $group_name to /etc/group" - grep "^$group_name:" /usr/lib/group | tee -a /etc/group >/dev/null - fi -} - -# Setup Groups -append_group docker -append_group incus-admin -append_group libvirt - -wheelarray=($(getent group wheel | cut -d ":" -f 4 | tr ',' '\n')) -for user in $wheelarray; do - usermod -aG docker $user - usermod -aG incus-admin $user - usermod -aG libvirt $user -done - -# Prevent future executions -echo "Writing state file" -echo "$GROUP_SETUP_VER" >"$GROUP_SETUP_VER_FILE" diff --git a/system_files/dx/usr/libexec/aurora-incus b/system_files/dx/usr/libexec/aurora-incus deleted file mode 100755 index 96fd5d46..00000000 --- a/system_files/dx/usr/libexec/aurora-incus +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/env bash - -# All the pieces needed to enable incus on Developer Experience Hosts -# This script is meant to be run on a aurora-dx host -if [ "$EUID" -eq 0 ] -then - echo "This script should not be run as root" - exit -fi - -source /usr/lib/ujust/ujust.sh -# add user to incus-admin group -pkexec usermod -aG incus-admin $USER - -# check for, then add necessary entries to /etc/subuid and /etc/subgid -echo -e "\nChecking for necessary entries in /etc/subuid and /etc/subgid" -if grep -q "root:1000000:1000000000" /etc/subuid -then - echo -e "\n * subuid root range" -else - echo "root:1000000:1000000000" | pkexec tee -a /etc/subuid -fi - -if grep -q "root:1000000:1000000000" /etc/subgid -then - echo -e "\n * subgid root range" -else - echo "root:1000000:1000000000" | pkexec tee -a /etc/subgid -fi - -if grep -q "root:$UID:1" /etc/subgid -then - echo -e "\n * subgid root->user" -else - echo "root:$UID:1" | pkexec tee -a /etc/subgid -fi - -if grep -q "root:$UID:1" /etc/subuid -then - echo "" - echo " * subuid root->user" -else - echo "root:$UID:1" | sudo tee -a /etc/subuid -fi - -echo -e "\nEnabling incus services" -pkexec /usr/bin/bash <