mirror of
https://github.com/dockur/windows.git
synced 2026-08-03 12:37:20 +01:00
feat: Add option to disable shared folder shortcuts (#1928)
This commit is contained in:
@@ -105,6 +105,7 @@ An empty default means the variable is unset and its value is determined automat
|
|||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `SAMBA` | `Y` | Enables the Samba shared folder. |
|
| `SAMBA` | `Y` | Enables the Samba shared folder. |
|
||||||
| `SAMBA_DEBUG` | `N` | Enables Samba debug output. |
|
| `SAMBA_DEBUG` | `N` | Enables Samba debug output. |
|
||||||
|
| `SHORTCUT` | `Y` | Creates desktop and drive shortcuts to the shared folder. |
|
||||||
|
|
||||||
## ⚙️ System
|
## ⚙️ System
|
||||||
|
|
||||||
|
|||||||
@@ -604,6 +604,21 @@ updateXML() {
|
|||||||
sed -i "s|</UserData>| <ProductKey>\n <Key>$key</Key>\n <WillShowUI>OnError</WillShowUI>\n </ProductKey>\n </UserData>|g" "$asset" || return 1
|
sed -i "s|</UserData>| <ProductKey>\n <Key>$key</Key>\n <WillShowUI>OnError</WillShowUI>\n </ProductKey>\n </UserData>|g" "$asset" || return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if disabled "$SHORTCUT" || disabled "$SAMBA"; then
|
||||||
|
if ! sed -i -E '
|
||||||
|
/<SynchronousCommand([[:space:]>])/ {
|
||||||
|
:command
|
||||||
|
N
|
||||||
|
/<\/SynchronousCommand>/!b command
|
||||||
|
/<Description>Create desktop shortcut to shared folder<\/Description>/d
|
||||||
|
/<Description>Map shared folder<\/Description>/d
|
||||||
|
}
|
||||||
|
' "$asset"; then
|
||||||
|
error "Failed to remove shared folder shortcuts from answer file!"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if ! xmllint --nonet --noout "$asset"; then
|
if ! xmllint --nonet --noout "$asset"; then
|
||||||
error "The generated answer file is not valid XML!"
|
error "The generated answer file is not valid XML!"
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
+1
-1
@@ -18,6 +18,7 @@ set -Eeuo pipefail
|
|||||||
: "${LANGUAGE:=""}"
|
: "${LANGUAGE:=""}"
|
||||||
: "${USERNAME:=""}"
|
: "${USERNAME:=""}"
|
||||||
: "${PASSWORD:=""}"
|
: "${PASSWORD:=""}"
|
||||||
|
: "${SHORTCUT:=""}"
|
||||||
: "${DOMAIN_OU:=""}"
|
: "${DOMAIN_OU:=""}"
|
||||||
: "${WORKGROUP:=""}"
|
: "${WORKGROUP:=""}"
|
||||||
: "${AUTOLOGIN:=""}"
|
: "${AUTOLOGIN:=""}"
|
||||||
@@ -36,7 +37,6 @@ LANGUAGE=$(strip "$LANGUAGE")
|
|||||||
USERNAME=$(strip "$USERNAME")
|
USERNAME=$(strip "$USERNAME")
|
||||||
DOMAIN_OU=$(strip "$DOMAIN_OU")
|
DOMAIN_OU=$(strip "$DOMAIN_OU")
|
||||||
WORKGROUP=$(strip "$WORKGROUP")
|
WORKGROUP=$(strip "$WORKGROUP")
|
||||||
AUTOLOGIN=$(strip "$AUTOLOGIN")
|
|
||||||
|
|
||||||
MIRRORS=3
|
MIRRORS=3
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user