
- Wifi-devices will be managed by NetworkManager - (USB-)Dockingstation with same MAC as internal device will be assigned to virbr1 - users with role-teacher have privilege - to create new NetworkManager connections - install additional software - change luks-key - package plasma-discover will not be removed (for teacherlaptops) - http-proxy-Settings will be configured by auto-detect - providing sudo-script to mount default-school from server after wireguard-connection is established
26 lines
1.1 KiB
Bash
26 lines
1.1 KiB
Bash
#!/usr/bin/bash
|
|
set -eu
|
|
|
|
exit_script() {
|
|
echo "unmounting media - terminated by trap!" >> "/tmp/${SUDO_UID}-exit-mount.log"
|
|
findmnt "/lmn/media/${SUDO_USER}/share" && umount "/lmn/media/${SUDO_USER}/share"
|
|
findmnt "/srv/samba/schools/default-school" && umount "/srv/samba/schools/default-school"
|
|
trap - SIGHUP SIGINT SIGTERM # clear the trap
|
|
kill -- -$$ # Sends SIGTERM to child/sub processes
|
|
}
|
|
|
|
findmnt /srv/samba/schools/default-school > /dev/null && exit 0
|
|
|
|
umask 0002
|
|
mkdir -p /srv/samba/schools/default-school
|
|
chmod 777 /srv/samba/schools/default-school
|
|
mkdir -p "/lmn/media/${SUDO_USER}/share"
|
|
|
|
mount -t cifs //server/default-school/ /srv/samba/schools/default-school \
|
|
-o "sec=krb5i,cruid=${SUDO_UID},user=${SUDO_USER},uid=${SUDO_UID},gid=1010,file_mode=0770,dir_mode=0770,mfsymlinks,nobrl,actimeo=600,cache=loose,echo_interval=10"
|
|
mount --bind /srv/samba/schools/default-school/share "/lmn/media/${SUDO_USER}/share"
|
|
|
|
echo "Einbindung erfolgreich!"
|
|
echo "Dieses Fenster bitte nicht schließen!"
|
|
trap exit_script SIGHUP SIGINT SIGTERM
|
|
sleep infinity
|