summaryrefslogtreecommitdiffstats
path: root/core/modules/vmchooser2
diff options
context:
space:
mode:
authorSimon Rettberg2019-06-03 16:46:09 +0200
committerSimon Rettberg2019-06-03 16:46:09 +0200
commit13f4691445cad10c9ada4a6ddd69a45206537a87 (patch)
treec6d200919074951475b497debe11d6caae671b70 /core/modules/vmchooser2
parent[slx-issue] Fix logo (diff)
downloadmltk-13f4691445cad10c9ada4a6ddd69a45206537a87.tar.gz
mltk-13f4691445cad10c9ada4a6ddd69a45206537a87.tar.xz
mltk-13f4691445cad10c9ada4a6ddd69a45206537a87.zip
[vmchooser2] Add profile.d hook to symlink config dir
Diffstat (limited to 'core/modules/vmchooser2')
-rwxr-xr-xcore/modules/vmchooser2/data/etc/profile.d/10-vmchooser.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/modules/vmchooser2/data/etc/profile.d/10-vmchooser.sh b/core/modules/vmchooser2/data/etc/profile.d/10-vmchooser.sh
new file mode 100755
index 00000000..5371590d
--- /dev/null
+++ b/core/modules/vmchooser2/data/etc/profile.d/10-vmchooser.sh
@@ -0,0 +1,13 @@
+#!/bin/ash
+
+TEMP_HOME_DIR="$HOME"
+PERSISTENT_HOME_DIR="$HOME/PERSISTENT"
+
+if [ -d "$PERSISTENT_HOME_DIR" ]; then
+
+ rm -f -- "$TEMP_HOME_DIR/.config/openslx"
+ mkdir -p "$PERSISTENT_HOME_DIR/.config/openslx" "$TEMP_HOME_DIR/.config"
+ ln -nfs "$PERSISTENT_HOME_DIR/.config/openslx" "$TEMP_HOME_DIR/.config/openslx"
+
+fi
+