diff options
author | jonas <jonas@8f53b18a-e215-0410-8885-9f593d34873e> | 2006-06-10 18:18:37 +0000 |
---|---|---|
committer | jonas <jonas@8f53b18a-e215-0410-8885-9f593d34873e> | 2006-06-10 18:18:37 +0000 |
commit | b6d85b04286d30498a11aaac36e75032b1e72801 (patch) | |
tree | 2fc597a2ae2cf69a5cc6b3e7162f02f89613b08d /addons/x11infoscreen/etc | |
parent | 369cb1e5a343ec9e7c6f05de64f0eb102488d77f (diff) |
Added all work so far...
git-svn-id: svn+ssh://xayide/home/jonas/private_svn/fleshybrid/trunk@2 8f53b18a-e215-0410-8885-9f593d34873e
Diffstat (limited to 'addons/x11infoscreen/etc')
-rw-r--r-- | addons/x11infoscreen/etc/X11/XF86Config-4 | 118 | ||||
-rw-r--r-- | addons/x11infoscreen/etc/X11/XF86Config-4-Trident | 118 | ||||
-rw-r--r-- | addons/x11infoscreen/etc/X11/XF86Config-4-Trident.orig | 0 | ||||
-rw-r--r-- | addons/x11infoscreen/etc/X11/XF86Config-4.diff | 91 | ||||
-rw-r--r-- | addons/x11infoscreen/etc/X11/XF86Config-4.orig | 131 | ||||
-rwxr-xr-x | addons/x11infoscreen/etc/init.d/flashybrid | 128 | ||||
-rw-r--r-- | addons/x11infoscreen/etc/init.d/flashybrid.diff | 12 | ||||
-rwxr-xr-x | addons/x11infoscreen/etc/init.d/flashybrid.orig | 125 | ||||
-rwxr-xr-x | addons/x11infoscreen/etc/init.d/local-infoscreen | 106 | ||||
l--------- | addons/x11infoscreen/etc/rc2.d/S99local-infoscreen | 1 |
10 files changed, 830 insertions, 0 deletions
diff --git a/addons/x11infoscreen/etc/X11/XF86Config-4 b/addons/x11infoscreen/etc/X11/XF86Config-4 new file mode 100644 index 0000000..059147c --- /dev/null +++ b/addons/x11infoscreen/etc/X11/XF86Config-4 @@ -0,0 +1,118 @@ +# XF86Config-4 (XFree86 X Window System server configuration file) +# +# This file was generated by dexconf, the Debian X Configuration tool, using +# values from the debconf database. +# +# Edit this file with caution, and see the XF86Config-4 manual page. +# (Type "man XF86Config-4" at the shell prompt.) +# +# This file is automatically updated on xserver-xfree86 package upgrades *only* +# if it has not been modified since the last upgrade of the xserver-xfree86 +# package. +# +# If you have edited this file but would like it to be automatically updated +# again, run the following commands as root: +# +# cp /etc/X11/XF86Config-4 /etc/X11/XF86Config-4.custom +# md5sum /etc/X11/XF86Config-4 >/var/lib/xfree86/XF86Config-4.md5sum +# dpkg-reconfigure xserver-xfree86 + +Section "Module" + Load "GLcore" + Load "bitmap" + Load "dbe" + Load "ddc" + Load "dri" + Load "extmod" + Load "freetype" + Load "glx" + Load "int10" + Load "record" + Load "speedo" + Load "type1" + Load "vbe" + Load "xtt" +EndSection + +Section "InputDevice" + Identifier "Generic Keyboard" + Driver "keyboard" + Option "CoreKeyboard" + Option "XkbRules" "xfree86" + Option "XkbModel" "pc105" + Option "XkbLayout" "dk" +EndSection + +Section "InputDevice" + Identifier "Configured Mouse" + Driver "mouse" + Option "CorePointer" + Option "Device" "/dev/psaux" + Option "Protocol" "PS/2" + Option "Emulate3Buttons" "true" + Option "ZAxisMapping" "4 5" +EndSection +Section "InputDevice" + Identifier "Generic Mouse" + Driver "mouse" + Option "SendCoreEvents" "true" + Option "Device" "/dev/input/mice" + Option "Protocol" "ImPS/2" + Option "Emulate3Buttons" "true" + Option "ZAxisMapping" "4 5" +EndSection + +Section "Device" + Identifier "Generic Video Card" + Driver "vesa" +EndSection + +Section "Monitor" + Identifier "Generic Monitor" + HorizSync 30-75 + VertRefresh 50-85 + Option "DPMS" +EndSection + +Section "Screen" + Identifier "Default Screen" + Device "Generic Video Card" + Monitor "Generic Monitor" + DefaultDepth 16 + SubSection "Display" + Depth 1 + Modes "1600x1200" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480" + EndSubSection + SubSection "Display" + Depth 4 + Modes "1600x1200" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480" + EndSubSection + SubSection "Display" + Depth 8 + Modes "1600x1200" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480" + EndSubSection + SubSection "Display" + Depth 15 + Modes "1600x1200" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480" + EndSubSection + SubSection "Display" + Depth 16 + Modes "1600x1200" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480" + EndSubSection + SubSection "Display" + Depth 24 + Modes "1600x1200" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480" + EndSubSection +EndSection + +Section "ServerLayout" + Identifier "Default Layout" + Screen "Default Screen" + InputDevice "Generic Keyboard" + InputDevice "Configured Mouse" + InputDevice "Generic Mouse" +EndSection + +Section "DRI" + Mode 0666 +EndSection diff --git a/addons/x11infoscreen/etc/X11/XF86Config-4-Trident b/addons/x11infoscreen/etc/X11/XF86Config-4-Trident new file mode 100644 index 0000000..b25dd59 --- /dev/null +++ b/addons/x11infoscreen/etc/X11/XF86Config-4-Trident @@ -0,0 +1,118 @@ +# XF86Config-4 (XFree86 X Window System server configuration file) +# +# This file was generated by dexconf, the Debian X Configuration tool, using +# values from the debconf database. +# +# Edit this file with caution, and see the XF86Config-4 manual page. +# (Type "man XF86Config-4" at the shell prompt.) +# +# This file is automatically updated on xserver-xfree86 package upgrades *only* +# if it has not been modified since the last upgrade of the xserver-xfree86 +# package. +# +# If you have edited this file but would like it to be automatically updated +# again, run the following commands as root: +# +# cp /etc/X11/XF86Config-4 /etc/X11/XF86Config-4.custom +# md5sum /etc/X11/XF86Config-4 >/var/lib/xfree86/XF86Config-4.md5sum +# dpkg-reconfigure xserver-xfree86 + +Section "Module" + Load "GLcore" + Load "bitmap" + Load "dbe" + Load "ddc" + Load "dri" + Load "extmod" + Load "freetype" + Load "glx" + Load "int10" + Load "record" + Load "speedo" + Load "type1" + Load "vbe" + Load "xtt" +EndSection + +Section "InputDevice" + Identifier "Generic Keyboard" + Driver "keyboard" + Option "CoreKeyboard" + Option "XkbRules" "xfree86" + Option "XkbModel" "pc105" + Option "XkbLayout" "dk" +EndSection + +Section "InputDevice" + Identifier "Configured Mouse" + Driver "mouse" + Option "CorePointer" + Option "Device" "/dev/psaux" + Option "Protocol" "PS/2" + Option "Emulate3Buttons" "true" + Option "ZAxisMapping" "4 5" +EndSection +Section "InputDevice" + Identifier "Generic Mouse" + Driver "mouse" + Option "SendCoreEvents" "true" + Option "Device" "/dev/input/mice" + Option "Protocol" "ImPS/2" + Option "Emulate3Buttons" "true" + Option "ZAxisMapping" "4 5" +EndSection + +Section "Device" + Identifier "Generic Video Card" + Driver "trident" +EndSection + +Section "Monitor" + Identifier "Generic Monitor" + HorizSync 30-75 + VertRefresh 50-85 + Option "DPMS" +EndSection + +Section "Screen" + Identifier "Default Screen" + Device "Generic Video Card" + Monitor "Generic Monitor" + DefaultDepth 16 + SubSection "Display" + Depth 1 + Modes "1600x1200" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480" + EndSubSection + SubSection "Display" + Depth 4 + Modes "1600x1200" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480" + EndSubSection + SubSection "Display" + Depth 8 + Modes "1600x1200" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480" + EndSubSection + SubSection "Display" + Depth 15 + Modes "1600x1200" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480" + EndSubSection + SubSection "Display" + Depth 16 + Modes "1600x1200" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480" + EndSubSection + SubSection "Display" + Depth 24 + Modes "1600x1200" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480" + EndSubSection +EndSection + +Section "ServerLayout" + Identifier "Default Layout" + Screen "Default Screen" + InputDevice "Generic Keyboard" + InputDevice "Configured Mouse" + InputDevice "Generic Mouse" +EndSection + +Section "DRI" + Mode 0666 +EndSection diff --git a/addons/x11infoscreen/etc/X11/XF86Config-4-Trident.orig b/addons/x11infoscreen/etc/X11/XF86Config-4-Trident.orig new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/addons/x11infoscreen/etc/X11/XF86Config-4-Trident.orig diff --git a/addons/x11infoscreen/etc/X11/XF86Config-4.diff b/addons/x11infoscreen/etc/X11/XF86Config-4.diff new file mode 100644 index 0000000..87d5a65 --- /dev/null +++ b/addons/x11infoscreen/etc/X11/XF86Config-4.diff @@ -0,0 +1,91 @@ +--- XF86Config-4.orig 2005-01-20 03:41:43.000000000 +0100 ++++ XF86Config-4 2004-11-17 03:25:12.000000000 +0100 +@@ -17,20 +17,6 @@ + # md5sum /etc/X11/XF86Config-4 >/var/lib/xfree86/XF86Config-4.md5sum + # dpkg-reconfigure xserver-xfree86 + +-Section "Files" +- FontPath "unix/:7100" # local font server +- # if the local font server has problems, we can fall back on these +- FontPath "/usr/lib/X11/fonts/misc" +- FontPath "/usr/lib/X11/fonts/cyrillic" +- FontPath "/usr/lib/X11/fonts/100dpi/:unscaled" +- FontPath "/usr/lib/X11/fonts/75dpi/:unscaled" +- FontPath "/usr/lib/X11/fonts/Type1" +- FontPath "/usr/lib/X11/fonts/CID" +- FontPath "/usr/lib/X11/fonts/Speedo" +- FontPath "/usr/lib/X11/fonts/100dpi" +- FontPath "/usr/lib/X11/fonts/75dpi" +-EndSection +- + Section "Module" + Load "GLcore" + Load "bitmap" +@@ -45,6 +31,7 @@ + Load "speedo" + Load "type1" + Load "vbe" ++ Load "xtt" + EndSection + + Section "InputDevice" +@@ -52,8 +39,8 @@ + Driver "keyboard" + Option "CoreKeyboard" + Option "XkbRules" "xfree86" +- Option "XkbModel" "pc104" +- Option "XkbLayout" "us" ++ Option "XkbModel" "pc105" ++ Option "XkbLayout" "dk" + EndSection + + Section "InputDevice" +@@ -82,8 +69,8 @@ + + Section "Monitor" + Identifier "Generic Monitor" +- HorizSync 28-50 +- VertRefresh 43-75 ++ HorizSync 30-75 ++ VertRefresh 50-85 + Option "DPMS" + EndSection + +@@ -91,30 +78,30 @@ + Identifier "Default Screen" + Device "Generic Video Card" + Monitor "Generic Monitor" +- DefaultDepth 24 ++ DefaultDepth 16 + SubSection "Display" + Depth 1 +- Modes "800x600" "640x480" ++ Modes "1600x1200" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480" + EndSubSection + SubSection "Display" + Depth 4 +- Modes "800x600" "640x480" ++ Modes "1600x1200" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480" + EndSubSection + SubSection "Display" + Depth 8 +- Modes "800x600" "640x480" ++ Modes "1600x1200" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480" + EndSubSection + SubSection "Display" + Depth 15 +- Modes "800x600" "640x480" ++ Modes "1600x1200" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480" + EndSubSection + SubSection "Display" + Depth 16 +- Modes "800x600" "640x480" ++ Modes "1600x1200" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480" + EndSubSection + SubSection "Display" + Depth 24 +- Modes "800x600" "640x480" ++ Modes "1600x1200" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480" + EndSubSection + EndSection + diff --git a/addons/x11infoscreen/etc/X11/XF86Config-4.orig b/addons/x11infoscreen/etc/X11/XF86Config-4.orig new file mode 100644 index 0000000..c6c901e --- /dev/null +++ b/addons/x11infoscreen/etc/X11/XF86Config-4.orig @@ -0,0 +1,131 @@ +# XF86Config-4 (XFree86 X Window System server configuration file) +# +# This file was generated by dexconf, the Debian X Configuration tool, using +# values from the debconf database. +# +# Edit this file with caution, and see the XF86Config-4 manual page. +# (Type "man XF86Config-4" at the shell prompt.) +# +# This file is automatically updated on xserver-xfree86 package upgrades *only* +# if it has not been modified since the last upgrade of the xserver-xfree86 +# package. +# +# If you have edited this file but would like it to be automatically updated +# again, run the following commands as root: +# +# cp /etc/X11/XF86Config-4 /etc/X11/XF86Config-4.custom +# md5sum /etc/X11/XF86Config-4 >/var/lib/xfree86/XF86Config-4.md5sum +# dpkg-reconfigure xserver-xfree86 + +Section "Files" + FontPath "unix/:7100" # local font server + # if the local font server has problems, we can fall back on these + FontPath "/usr/lib/X11/fonts/misc" + FontPath "/usr/lib/X11/fonts/cyrillic" + FontPath "/usr/lib/X11/fonts/100dpi/:unscaled" + FontPath "/usr/lib/X11/fonts/75dpi/:unscaled" + FontPath "/usr/lib/X11/fonts/Type1" + FontPath "/usr/lib/X11/fonts/CID" + FontPath "/usr/lib/X11/fonts/Speedo" + FontPath "/usr/lib/X11/fonts/100dpi" + FontPath "/usr/lib/X11/fonts/75dpi" +EndSection + +Section "Module" + Load "GLcore" + Load "bitmap" + Load "dbe" + Load "ddc" + Load "dri" + Load "extmod" + Load "freetype" + Load "glx" + Load "int10" + Load "record" + Load "speedo" + Load "type1" + Load "vbe" +EndSection + +Section "InputDevice" + Identifier "Generic Keyboard" + Driver "keyboard" + Option "CoreKeyboard" + Option "XkbRules" "xfree86" + Option "XkbModel" "pc104" + Option "XkbLayout" "us" +EndSection + +Section "InputDevice" + Identifier "Configured Mouse" + Driver "mouse" + Option "CorePointer" + Option "Device" "/dev/psaux" + Option "Protocol" "PS/2" + Option "Emulate3Buttons" "true" + Option "ZAxisMapping" "4 5" +EndSection +Section "InputDevice" + Identifier "Generic Mouse" + Driver "mouse" + Option "SendCoreEvents" "true" + Option "Device" "/dev/input/mice" + Option "Protocol" "ImPS/2" + Option "Emulate3Buttons" "true" + Option "ZAxisMapping" "4 5" +EndSection + +Section "Device" + Identifier "Generic Video Card" + Driver "vesa" +EndSection + +Section "Monitor" + Identifier "Generic Monitor" + HorizSync 28-50 + VertRefresh 43-75 + Option "DPMS" +EndSection + +Section "Screen" + Identifier "Default Screen" + Device "Generic Video Card" + Monitor "Generic Monitor" + DefaultDepth 24 + SubSection "Display" + Depth 1 + Modes "800x600" "640x480" + EndSubSection + SubSection "Display" + Depth 4 + Modes "800x600" "640x480" + EndSubSection + SubSection "Display" + Depth 8 + Modes "800x600" "640x480" + EndSubSection + SubSection "Display" + Depth 15 + Modes "800x600" "640x480" + EndSubSection + SubSection "Display" + Depth 16 + Modes "800x600" "640x480" + EndSubSection + SubSection "Display" + Depth 24 + Modes "800x600" "640x480" + EndSubSection +EndSection + +Section "ServerLayout" + Identifier "Default Layout" + Screen "Default Screen" + InputDevice "Generic Keyboard" + InputDevice "Configured Mouse" + InputDevice "Generic Mouse" +EndSection + +Section "DRI" + Mode 0666 +EndSection diff --git a/addons/x11infoscreen/etc/init.d/flashybrid b/addons/x11infoscreen/etc/init.d/flashybrid new file mode 100755 index 0000000..5ab4037 --- /dev/null +++ b/addons/x11infoscreen/etc/init.d/flashybrid @@ -0,0 +1,128 @@ +#!/bin/sh +# Set up/shutdown the flashybrid system, including the ramdisk and partial +# directory bind mounts. This needs to run at the part of system bootup that +# mounts all the disks. It should also run at shutdown right before +# filesystems are unmounted. + +CONFDIR=/etc/flashybrid +if [ -e $CONFDIR/config ]; then + . $CONFDIR/config +fi + +ENABLED=no +if [ -e /etc/default/flashybrid ]; then + . /etc/default/flashybrid +fi + +if [ -z "$RAMMOUNT" ]; then + exit 0 +fi + +is_mounted () { + grep -q " $1 " /proc/mounts +} + +case "$1" in +start) + if [ "$ENABLED" != yes ]; then + echo "Not setting up flashybrid system: disabled." + exit + fi + + printf "Setting up flashybrid system..." + + # Set up partial directories and so on, make sure disk is + # unmounted. + fh-embed >/dev/null + + # Set up ram disk to hold variable data. + if ! is_mounted $RAMMOUNT; then + mount tmpfs -t tmpfs $RAMMOUNT + fi + + # Temporary directories on ram disk. + for dir in $(grep -v '^#' $CONFDIR/ramtmp); do + mkdir -p -m 1777 $RAMMOUNT/$dir + if is_mounted $dir; then + umount $dir + fi + mount --bind $RAMMOUNT/$dir $dir + done + + # Copy data from flash to ram disk for these directories. + for dir in $(grep -v '^#' $CONFDIR/ramstore); do + # Skip dirs that are not present. + if [ -d $dir ]; then + ramdir=$RAMMOUNT$dir + if is_mounted $dir; then + umount $dir + fi + if is_mounted $ramdir.flash; then + umount $ramdir.flash + fi + if [ ! -d $ramdir ]; then + mkdir -p ${ramdir%/*} # dirname + cp -a $dir $ramdir + fi + mkdir -p $ramdir.flash + mount --bind $dir $ramdir.flash + mount --bind $ramdir $dir + fi + done + + # Make sure virtual filesystems are properly mounted + invoke-rc.d mountvirtfs start || /bin/true + + echo "done." +;; +stop) + if [ "$ENABLED" != yes ]; then + echo "Not shutting down flashybrid system: disabled." + exit + fi + + printf "Shutting down flashybrid system..." + + # Copy data to flash. + # Remount the flash read-write so the copies to it will work. + mount -o remount,rw / + for dir in $(grep -v '^#' $CONFDIR/ramstore); do + if [ -d $RAMMOUNT/$dir ] && [ -d $RAMMOUNT/$dir.flash ]; then + # rsync is used to avoid churning the flash + # unnecessarily. The trailing slashes are very + # important.. + rsync --delete -a $RAMMOUNT/$dir/ $RAMMOUNT/$dir.flash/ + fi + done + + for dir in $(grep -v '^#' $CONFDIR/ramtmp); do + if is_mounted $dir; then + umount $dir + fi + done + + for dir in $(grep -v '^#' $CONFDIR/ramstore); do + ramdir=$RAMMOUNT$dir + if is_mounted $ramdir.flash; then + umount $ramdir.flash + fi + if is_mounted $dir; then + umount $dir + fi + done + + if is_mounted $RAMMOUNT; then + umount $RAMMOUNT + fi + + echo "done." +;; +restart|force-reload) + $0 stop + $0 start +;; +*) + echo "Usage: $0 {start|stop|restart|force-reload}" + exit 1 +;; +esac diff --git a/addons/x11infoscreen/etc/init.d/flashybrid.diff b/addons/x11infoscreen/etc/init.d/flashybrid.diff new file mode 100644 index 0000000..34c0fda --- /dev/null +++ b/addons/x11infoscreen/etc/init.d/flashybrid.diff @@ -0,0 +1,12 @@ +--- flashybrid.orig 2003-11-25 21:26:14.000000000 +0000 ++++ flashybrid 2004-11-17 02:05:22.000000000 +0000 +@@ -70,6 +70,9 @@ + fi + done + ++ # Make sure virtual filesystems are properly mounted ++ invoke-rc.d mountvirtfs start || /bin/true ++ + echo "done." + ;; + stop) diff --git a/addons/x11infoscreen/etc/init.d/flashybrid.orig b/addons/x11infoscreen/etc/init.d/flashybrid.orig new file mode 100755 index 0000000..9ea31d7 --- /dev/null +++ b/addons/x11infoscreen/etc/init.d/flashybrid.orig @@ -0,0 +1,125 @@ +#!/bin/sh +# Set up/shutdown the flashybrid system, including the ramdisk and partial +# directory bind mounts. This needs to run at the part of system bootup that +# mounts all the disks. It should also run at shutdown right before +# filesystems are unmounted. + +CONFDIR=/etc/flashybrid +if [ -e $CONFDIR/config ]; then + . $CONFDIR/config +fi + +ENABLED=no +if [ -e /etc/default/flashybrid ]; then + . /etc/default/flashybrid +fi + +if [ -z "$RAMMOUNT" ]; then + exit 0 +fi + +is_mounted () { + grep -q " $1 " /proc/mounts +} + +case "$1" in +start) + if [ "$ENABLED" != yes ]; then + echo "Not setting up flashybrid system: disabled." + exit + fi + + printf "Setting up flashybrid system..." + + # Set up partial directories and so on, make sure disk is + # unmounted. + fh-embed >/dev/null + + # Set up ram disk to hold variable data. + if ! is_mounted $RAMMOUNT; then + mount tmpfs -t tmpfs $RAMMOUNT + fi + + # Temporary directories on ram disk. + for dir in $(grep -v '^#' $CONFDIR/ramtmp); do + mkdir -p -m 1777 $RAMMOUNT/$dir + if is_mounted $dir; then + umount $dir + fi + mount --bind $RAMMOUNT/$dir $dir + done + + # Copy data from flash to ram disk for these directories. + for dir in $(grep -v '^#' $CONFDIR/ramstore); do + # Skip dirs that are not present. + if [ -d $dir ]; then + ramdir=$RAMMOUNT$dir + if is_mounted $dir; then + umount $dir + fi + if is_mounted $ramdir.flash; then + umount $ramdir.flash + fi + if [ ! -d $ramdir ]; then + mkdir -p ${ramdir%/*} # dirname + cp -a $dir $ramdir + fi + mkdir -p $ramdir.flash + mount --bind $dir $ramdir.flash + mount --bind $ramdir $dir + fi + done + + echo "done." +;; +stop) + if [ "$ENABLED" != yes ]; then + echo "Not shutting down flashybrid system: disabled." + exit + fi + + printf "Shutting down flashybrid system..." + + # Copy data to flash. + # Remount the flash read-write so the copies to it will work. + mount -o remount,rw / + for dir in $(grep -v '^#' $CONFDIR/ramstore); do + if [ -d $RAMMOUNT/$dir ] && [ -d $RAMMOUNT/$dir.flash ]; then + # rsync is used to avoid churning the flash + # unnecessarily. The trailing slashes are very + # important.. + rsync --delete -a $RAMMOUNT/$dir/ $RAMMOUNT/$dir.flash/ + fi + done + + for dir in $(grep -v '^#' $CONFDIR/ramtmp); do + if is_mounted $dir; then + umount $dir + fi + done + + for dir in $(grep -v '^#' $CONFDIR/ramstore); do + ramdir=$RAMMOUNT$dir + if is_mounted $ramdir.flash; then + umount $ramdir.flash + fi + if is_mounted $dir; then + umount $dir + fi + done + + if is_mounted $RAMMOUNT; then + umount $RAMMOUNT + fi + + echo "done." +;; +restart|force-reload) + $0 stop + $0 start +;; +*) + echo "Usage: $0 {start|stop|restart|force-reload}" + exit 1 +;; +esac diff --git a/addons/x11infoscreen/etc/init.d/local-infoscreen b/addons/x11infoscreen/etc/init.d/local-infoscreen new file mode 100755 index 0000000..c9ef034 --- /dev/null +++ b/addons/x11infoscreen/etc/init.d/local-infoscreen @@ -0,0 +1,106 @@ +#! /bin/sh +# +# local-infoscreen +# +# Author: Jonas Smedegaard <dr@jones.dk> +# + +set -e + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DESC="infoscreen daemons" +NAME=infoscreen +DAEMON=/usr/sbin/$NAME +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Gracefully exit if the package has been removed. +#test -x $DAEMON || exit 0 + +# Read config file if it is present. +#if [ -r /etc/default/$NAME ] +#then +# . /etc/default/$NAME +#fi + +# +# Function that starts the daemon/service. +# +d_start() { +# start-stop-daemon --start --quiet --pidfile $PIDFILE \ +# --exec $DAEMON + killall XFree86 -wq || /bin/true + /usr/local/bin/launch-x11 + /usr/local/bin/launch-sync + sleep 5 + /usr/local/bin/launch-unclutter +# /usr/local/bin/launch-feh + /usr/local/bin/launch-qiv +} + +# +# Function that stops the daemon/service. +# +d_stop() { +# start-stop-daemon --stop --quiet --pidfile $PIDFILE \ +# --name $NAME + /usr/local/bin/launch-qiv -k || /bin/true +# /usr/local/bin/launch-feh -k || /bin/true + /usr/local/bin/launch-unclutter -k || /bin/true + /usr/local/bin/launch-sync -k || /bin/true + /usr/local/bin/launch-x11 -k || /bin/true + killall XFree86 -wq || /bin/true +} + +# +# Function that sends a SIGHUP to the daemon/service. +# +d_reload() { + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --name $NAME --signal 1 +} + +case "$1" in + start) + echo -n "Starting $DESC: $NAME" + d_start + echo "." + ;; + stop) + echo -n "Stopping $DESC: $NAME" + d_stop + echo "." + ;; + #reload) + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this an "exit 0". + # + # echo -n "Reloading $DESC configuration..." + # d_reload + # echo "done." + #;; + restart|force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart". + # + echo -n "Restarting $DESC: $NAME" + d_stop + sleep 1 + d_start + echo "." + ;; + *) + # echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/addons/x11infoscreen/etc/rc2.d/S99local-infoscreen b/addons/x11infoscreen/etc/rc2.d/S99local-infoscreen new file mode 120000 index 0000000..d1cdbc0 --- /dev/null +++ b/addons/x11infoscreen/etc/rc2.d/S99local-infoscreen @@ -0,0 +1 @@ +../init.d/local-infoscreen
\ No newline at end of file |