From: root Date: Fri, 4 Jan 2019 13:16:39 +0000 (+0100) Subject: include custom screensaver, include boot option for remote homes X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=33bd8057f6ac1e5076530159b87377ea2506fdb5;p=bootimage include custom screensaver, include boot option for remote homes --- diff --git a/config_elok/etc/X11/Xresources/xscreensaver b/config_elok/etc/X11/Xresources/xscreensaver new file mode 100644 index 0000000..5f1c3b6 --- /dev/null +++ b/config_elok/etc/X11/Xresources/xscreensaver @@ -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 index 0000000..888b7a5 --- /dev/null +++ b/config_elok/etc/rc.local @@ -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/virtual/Desktop/.directory b/config_elok/etc/skel/Desktop/.directory similarity index 100% rename from config_elok/home/virtual/Desktop/.directory rename to config_elok/etc/skel/Desktop/.directory diff --git a/config_elok/home/virtual/Desktop/clementine.desktop b/config_elok/etc/skel/Desktop/clementine.desktop similarity index 100% rename from config_elok/home/virtual/Desktop/clementine.desktop rename to config_elok/etc/skel/Desktop/clementine.desktop diff --git a/config_elok/home/virtual/Desktop/firefox-esr.desktop b/config_elok/etc/skel/Desktop/firefox-esr.desktop similarity index 100% rename from config_elok/home/virtual/Desktop/firefox-esr.desktop rename to config_elok/etc/skel/Desktop/firefox-esr.desktop diff --git a/config_elok/home/virtual/Desktop/marble.desktop b/config_elok/etc/skel/Desktop/marble.desktop similarity index 100% rename from config_elok/home/virtual/Desktop/marble.desktop rename to config_elok/etc/skel/Desktop/marble.desktop diff --git a/config_elok/home/virtual/Desktop/startcenter.desktop b/config_elok/etc/skel/Desktop/startcenter.desktop similarity index 100% rename from config_elok/home/virtual/Desktop/startcenter.desktop rename to config_elok/etc/skel/Desktop/startcenter.desktop diff --git a/config_elok/home/guest b/config_elok/home/guest deleted file mode 120000 index 612e396..0000000 --- a/config_elok/home/guest +++ /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 index 0000000..cac7161 Binary files /dev/null and b/config_elok/var/screensaver.mp4 differ