From 9f0d40366d34776ee70a5bde2556157a17d01986 Mon Sep 17 00:00:00 2001 From: Spirit Date: Mon, 19 Aug 2024 10:06:11 +0300 Subject: [PATCH] create --- init-void.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 init-void.sh diff --git a/init-void.sh b/init-void.sh new file mode 100755 index 0000000..a0214d1 --- /dev/null +++ b/init-void.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +if [ -z "$USERNAME" ]; then +USERNAME="spirit" +fi + +cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/ + +xbps-install -Suy xbps +xbps-install -uy +xbps-install -y base-system +xbps-remove -y base-voidstrap +xbps-reconfigure -fa + +useradd -m -G wheel -s /bin/bash $USERNAME +ed -i 's/# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers + +if [[ "$1" == "--wsl" ]]; then +cat < /etc/wsl.conf +[user] +default=$USERNAME +EOF +fi