mirror of
https://github.com/karl0ss/AnotterKiosk.git
synced 2025-07-28 03:00:16 +01:00
another fix
This commit is contained in:
parent
249327a8cc
commit
d9d8fb3d5a
@ -60,6 +60,8 @@ mkdir -p /etc/wpa_supplicant/
|
|||||||
ln -sf /tmp/hosts /etc/hosts
|
ln -sf /tmp/hosts /etc/hosts
|
||||||
ln -sf /tmp/hostname /etc/hostname
|
ln -sf /tmp/hostname /etc/hostname
|
||||||
ln -sf /tmp/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.conf
|
ln -sf /tmp/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.conf
|
||||||
|
mkdir -p /etc/NetworkManager/system-connections/
|
||||||
|
ln -sf /tmp/kiosk.nmconnection /etc/NetworkManager/system-connections/kiosk.nmconnection
|
||||||
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|
||||||
|
@ -11,13 +11,17 @@ if [ -z "${WIFI_SSID}" ]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# The profile will be written to /tmp and symlinked from /etc
|
||||||
|
PROFILE_NAME="kiosk"
|
||||||
|
PROFILE_PATH="/tmp/${PROFILE_NAME}.nmconnection"
|
||||||
|
|
||||||
# Generate a UUID for the connection
|
# Generate a UUID for the connection
|
||||||
UUID=$(uuidgen)
|
UUID=$(uuidgen)
|
||||||
|
|
||||||
# Create the NetworkManager connection file
|
# Create the NetworkManager connection file
|
||||||
cat > "/etc/NetworkManager/system-connections/${WIFI_SSID}.nmconnection" << EOF
|
cat > "${PROFILE_PATH}" << EOF
|
||||||
[connection]
|
[connection]
|
||||||
id=${WIFI_SSID}
|
id=${PROFILE_NAME}
|
||||||
uuid=${UUID}
|
uuid=${UUID}
|
||||||
type=wifi
|
type=wifi
|
||||||
interface-name=wlan0
|
interface-name=wlan0
|
||||||
@ -40,7 +44,7 @@ method=auto
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Set the correct permissions
|
# Set the correct permissions
|
||||||
chmod 600 "/etc/NetworkManager/system-connections/${WIFI_SSID}.nmconnection"
|
chmod 600 "${PROFILE_PATH}"
|
||||||
chown root:root "/etc/NetworkManager/system-connections/${WIFI_SSID}.nmconnection"
|
chown root:root "${PROFILE_PATH}"
|
||||||
|
|
||||||
echo "Successfully created connection profile for ${WIFI_SSID}."
|
echo "Successfully created connection profile at ${PROFILE_PATH}."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user