tasket / Qubes-vpn-support

VPN configuration in Qubes OS
GNU General Public License v3.0
126 stars 28 forks source link

[Feature Request] Option to skip interactive configuration in AppVM #61

Open lkubb opened 2 years ago

lkubb commented 2 years ago

I'm trying to install qubes-vpn-support inside a salt state. Currently, I have to install it in the template and manually configure the AppVM when it first starts, write a wrapper script, use a slightly patched script or do everything in salt.

This is no big problem, but imho it would be nice to have the simple option to skip the interactive configuration inside an AppVM in the official version for cases like this.

diff --git a/files-main/qubes-vpn-setup b/files-main/qubes-vpn-setup
index ae78ae1..0cc5c4b 100755
--- a/files-main/qubes-vpn-setup
+++ b/files-main/qubes-vpn-setup
@@ -141,7 +141,9 @@ case "$1" in
         ln -s -f /rw/config/qubes-vpn-setup /usr/lib/qubes/qubes-vpn-setup
         ln -s -f /rw/config/qubes-vpn-ns /usr/lib/qubes/qubes-vpn-ns
         echo "copy complete."
-        do_userpass
+        if [[ -z "$2" || "$2" != "--noconfig" ]]; then
+            do_userpass
+        fi
         echo "Done!"

     else