build: add image builder and image variants
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
IMAGE_NAME="Parch-Linux-x86_64-basic-${build_version}.qcow2"
|
||||
DISK_SIZE="40G"
|
||||
PACKAGES=()
|
||||
SERVICES=()
|
||||
|
||||
function pre() {
|
||||
local NEWUSER="arch"
|
||||
arch-chroot "${MOUNT}" /usr/bin/useradd -m -U "${NEWUSER}"
|
||||
echo -e "${NEWUSER}\n${NEWUSER}" | arch-chroot "${MOUNT}" /usr/bin/passwd "${NEWUSER}"
|
||||
echo "${NEWUSER} ALL=(ALL) NOPASSWD: ALL" >"${MOUNT}/etc/sudoers.d/${NEWUSER}"
|
||||
|
||||
cat <<EOF >"${MOUNT}/etc/systemd/network/80-dhcp.network"
|
||||
[Match]
|
||||
Name=en*
|
||||
Name=eth*
|
||||
|
||||
[Link]
|
||||
RequiredForOnline=routable
|
||||
|
||||
[Network]
|
||||
DHCP=yes
|
||||
EOF
|
||||
}
|
||||
|
||||
function post() {
|
||||
qemu-img convert -c -f raw -O qcow2 "${1}" "${2}"
|
||||
rm "${1}"
|
||||
}
|
||||
Reference in New Issue
Block a user