]> git.plutz.net Git - bootimage/commitdiff
include custom screensaver, include boot option for remote homes elok
authorroot <root@Poolmaster.office.workstation-berlin.org>
Fri, 4 Jan 2019 13:16:39 +0000 (14:16 +0100)
committerroot <root@Poolmaster.office.workstation-berlin.org>
Fri, 4 Jan 2019 13:16:39 +0000 (14:16 +0100)
config_elok/etc/X11/Xresources/xscreensaver [new file with mode: 0644]
config_elok/etc/rc.local [new file with mode: 0755]
config_elok/etc/skel/Desktop/.directory [moved from config_elok/home/virtual/Desktop/.directory with 100% similarity]
config_elok/etc/skel/Desktop/clementine.desktop [moved from config_elok/home/virtual/Desktop/clementine.desktop with 100% similarity]
config_elok/etc/skel/Desktop/firefox-esr.desktop [moved from config_elok/home/virtual/Desktop/firefox-esr.desktop with 100% similarity]
config_elok/etc/skel/Desktop/marble.desktop [moved from config_elok/home/virtual/Desktop/marble.desktop with 100% similarity]
config_elok/etc/skel/Desktop/startcenter.desktop [moved from config_elok/home/virtual/Desktop/startcenter.desktop with 100% similarity]
config_elok/home/guest [deleted symlink]
config_elok/var/screensaver.mp4 [new file with mode: 0644]

diff --git a/config_elok/etc/X11/Xresources/xscreensaver b/config_elok/etc/X11/Xresources/xscreensaver
new file mode 100644 (file)
index 0000000..5f1c3b6
--- /dev/null
@@ -0,0 +1,2 @@
+xscreensaver.programs: mplayer -fixed-vo -wid $XSCREENSAVER_WINDOW -really-quiet -loop 0 -vf-add crop=352:280:0:120 /var/screensaver.mp4
+xscreensaver.fade: false
diff --git a/config_elok/etc/rc.local b/config_elok/etc/rc.local
new file mode 100755 (executable)
index 0000000..888b7a5
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+mountdef="$(grep -Eo 'home=[^ ]+' /proc/cmdline)"
+mountdef="${mountdef#home=}"
+mountpath="${mountdef%%;*}"
+mountpath="${mountpath#*://}"
+mounttype="${mountdef%%://*}"
+mountopts="${mountdef#*;}"
+
+macaddr="$(ip address show |grep -Eom1 'link/ether [0-9a-fA-F:]+' |tr : _)"
+macaddr="${macaddr#link/ether }"
+
+[ "$mounttype" = "$mountdef" ] && mounttype=auto
+[ ! "$macaddr" ] && macaddr=noname
+
+if [ "$mountpath" -a "$mountopts" ]; then
+  mount -t "$mounttype" "$mountpath" /home -o "$mountopts"
+elif [ "$mountpath" ]; then
+  mount -t "$mounttype" "$mountpath" /home
+fi
+
+usermod -d "/home/${macaddr}/" guest
diff --git a/config_elok/home/guest b/config_elok/home/guest
deleted file mode 120000 (symlink)
index 612e396..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/home/virtual/
\ No newline at end of file
diff --git a/config_elok/var/screensaver.mp4 b/config_elok/var/screensaver.mp4
new file mode 100644 (file)
index 0000000..cac7161
Binary files /dev/null and b/config_elok/var/screensaver.mp4 differ