splitting some stuff for later
This commit is contained in:
parent
e2a1d5fa18
commit
0c9ea26155
9 changed files with 67 additions and 30 deletions
|
@ -5,7 +5,8 @@
|
|||
"download_name": "bookworm",
|
||||
"packages": "grub-pc linux-image-amd64 task-gnome-desktop",
|
||||
"scripts": [
|
||||
"configs/scripts/install.sh"
|
||||
"configs/scripts/install.sh",
|
||||
"configs/scripts/user.sh"
|
||||
],
|
||||
"package_manager": "apt"
|
||||
}
|
|
@ -5,7 +5,8 @@
|
|||
"download_name": "bookworm",
|
||||
"packages": "grub-pc linux-image-amd64 task-kde-desktop",
|
||||
"scripts": [
|
||||
"configs/scripts/install.sh"
|
||||
"configs/scripts/install.sh",
|
||||
"configs/scripts/user.sh"
|
||||
],
|
||||
"package_manager": "apt"
|
||||
}
|
|
@ -5,7 +5,8 @@
|
|||
"download_name": "bookworm",
|
||||
"packages": "nginx grub-pc linux-image-amd64",
|
||||
"scripts": [
|
||||
"configs/scripts/install.sh"
|
||||
"configs/scripts/install.sh",
|
||||
"configs/scripts/server.sh"
|
||||
],
|
||||
"package_manager": "apt"
|
||||
}
|
|
@ -35,28 +35,4 @@ elif chroot /mnt /bin/bash -c "command -v grub-install &>/dev/null;" then
|
|||
chroot /mnt /bin/bash -c "grub-install /dev/sda"
|
||||
fi
|
||||
|
||||
while true; do
|
||||
read -p "Enter a username (lowercase letters, digits, underscores and hyphens): " username
|
||||
chroot /mnt /bin/bash -c "useradd -m '$username'"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
while true; do
|
||||
chroot /mnt /bin/bash -c "passwd '$username'"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
while true; do
|
||||
read -p "Enter the hostname: " hostname
|
||||
chroot /mnt /bin/bash -c "echo $hostname > /etc/hostname"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
|
23
configs/scripts/server.sh
Normal file
23
configs/scripts/server.sh
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This file is part of VM-Experiments.
|
||||
# Licensed under the GPL-3.0-or-later. See LICENSE for details.
|
||||
|
||||
trap '' SIGINT SIGTERM
|
||||
|
||||
while true; do
|
||||
chroot /mnt /bin/bash -c "passwd root"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
while true; do
|
||||
read -p "Enter the hostname: " hostname
|
||||
chroot /mnt /bin/bash -c "echo $hostname > /etc/hostname"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
break
|
||||
fi
|
||||
done
|
32
configs/scripts/user.sh
Normal file
32
configs/scripts/user.sh
Normal file
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This file is part of VM-Experiments.
|
||||
# Licensed under the GPL-3.0-or-later. See LICENSE for details.
|
||||
|
||||
trap '' SIGINT SIGTERM
|
||||
|
||||
while true; do
|
||||
read -p "Enter a username (lowercase letters, digits, underscores and hyphens): " username
|
||||
chroot /mnt /bin/bash -c "useradd -m '$username'"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
while true; do
|
||||
chroot /mnt /bin/bash -c "passwd '$username'"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
while true; do
|
||||
read -p "Enter the hostname: " hostname
|
||||
chroot /mnt /bin/bash -c "echo $hostname > /etc/hostname"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
break
|
||||
fi
|
||||
done
|
|
@ -5,7 +5,8 @@
|
|||
"download_name": "noble-base-amd64.tar.gz",
|
||||
"packages": "grub-pc linux-image-generic ubuntu-desktop",
|
||||
"scripts": [
|
||||
"configs/scripts/install.sh"
|
||||
"configs/scripts/install.sh",
|
||||
"configs/scripts/user.sh"
|
||||
],
|
||||
"package_manager": "apt"
|
||||
}
|
|
@ -5,7 +5,8 @@
|
|||
"download_name": "noble-base-amd64.tar.gz",
|
||||
"packages": "grub-pc linux-image-generic kubuntu-desktop",
|
||||
"scripts": [
|
||||
"configs/scripts/install.sh"
|
||||
"configs/scripts/install.sh",
|
||||
"configs/scripts/user.sh"
|
||||
],
|
||||
"package_manager": "apt"
|
||||
}
|
|
@ -5,7 +5,8 @@
|
|||
"download_name": "noble-base-amd64.tar.gz",
|
||||
"packages": "nginx grub-pc linux-image-generic",
|
||||
"scripts": [
|
||||
"configs/scripts/install.sh"
|
||||
"configs/scripts/install.sh",
|
||||
"configs/scripts/server.sh"
|
||||
],
|
||||
"package_manager": "apt"
|
||||
}
|
Loading…
Reference in a new issue