diff options
author | Dirk von Suchodoletz | 2008-08-06 10:35:09 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2008-08-06 10:35:09 +0200 |
commit | 7ff8a66fd6b0cad46405ecd0a505d3e6cde5dde4 (patch) | |
tree | f734ebe52eb0bda56faccd0b3c9911a63b027a4b /os-plugins/plugins/x11vnc | |
parent | Small dirty bug in XX_vmware.sh fixed (-p is unknown to testmkd) (diff) | |
download | core-7ff8a66fd6b0cad46405ecd0a505d3e6cde5dde4.tar.gz core-7ff8a66fd6b0cad46405ecd0a505d3e6cde5dde4.tar.xz core-7ff8a66fd6b0cad46405ecd0a505d3e6cde5dde4.zip |
Formatting, unification of plugin stage3 scripts ...
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1965 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/x11vnc')
-rw-r--r-- | os-plugins/plugins/x11vnc/XX_x11vnc.sh | 81 |
1 files changed, 42 insertions, 39 deletions
diff --git a/os-plugins/plugins/x11vnc/XX_x11vnc.sh b/os-plugins/plugins/x11vnc/XX_x11vnc.sh index 327d247a..16327b0a 100644 --- a/os-plugins/plugins/x11vnc/XX_x11vnc.sh +++ b/os-plugins/plugins/x11vnc/XX_x11vnc.sh @@ -1,5 +1,3 @@ -#!/bin/ash -# # Copyright (c) 2007..2008 - RZ Uni Freiburg # Copyright (c) 2008 - OpenSLX GmbH # @@ -11,6 +9,9 @@ # # General information about OpenSLX can be found at http://openslx.org # +# script is included from init via the "." load function - thus it has all +# variables and functions available + [ -e /etc/functions ] && . /etc/functions [ -e /etc/distro-functions ] && . /etc/distro-functions [ -d /etc/sysconfig ] && . /etc/sysconfig/config @@ -20,7 +21,7 @@ if [ -e /initramfs/plugin-conf/x11vnc.conf ]; then if [ $x11vnc_active -ne 0 ]; then [ $DEBUGLEVEL -gt 0 ] && echo "executing the 'x11vnc' os-plugin ..."; # create config dir for stage 3 - mkdir -p /mnt/etc/x11vnc + mkdir -p /mnt/etc/x11vnc # default parameters PARAMS="-bg -forever" # client restrictions @@ -46,52 +47,54 @@ if [ -e /initramfs/plugin-conf/x11vnc.conf ]; then echo "$x11vnc_viewonlypass" >> /mnt/etc/x11vnc/passwd # multiuser handling sed -i "s/,/\n/" /mnt/etc/x11vnc/passwd - # add parameter to commandline + # add parameter to commandline PARAMS="$PARAMS -passwdfile rm:/etc/x11vnc/passwd" ;; rfbauth) - # use rfbauth - vncpasswd "$x11vnc_pass" > /mnt/etc/x11vnc/passwd - PARAMS="$PARAMS -rfbauth /etc/x11vnc/passwd" - ;; - *) - # no password - PARAMS="$PARAMS -nopw" - ;; - esac + # use rfbauth + vncpasswd "$x11vnc_pass" > /mnt/etc/x11vnc/passwd + PARAMS="$PARAMS -rfbauth /etc/x11vnc/passwd" + ;; + *) + # no password + PARAMS="$PARAMS -nopw" + ;; + esac - # force viewonly - if [ "$x11vnc_force_viewonly" = "1" -o "$x11vnc_force_viewonly" = "yes" ]; then - PARAMS="$PARAMS -viewonly" - fi + # force viewonly + if [ "$x11vnc_force_viewonly" = "1" \ + -o "$x11vnc_force_viewonly" = "yes" ]; then + PARAMS="$PARAMS -viewonly" + fi - # force localhost - if [ "$x11vnc_force_localhost" = "1" -o "$x11vnc_force_localhost" = "yes" ]; then - PARAMS="$PARAMS -localhost" - fi + # force localhost + if [ "$x11vnc_force_localhost" = "1" \ + -o "$x11vnc_force_localhost" = "yes" ]; then + PARAMS="$PARAMS -localhost" + fi - # enable logging - if [ "$x11vnc_logging" = "1" -o "$x11vnc_logging" = "yes" ]; then - PARAMS="$PARAMS -o /var/log/x11vnc.log" - fi + # enable logging + if [ "$x11vnc_logging" = "1" -o "$x11vnc_logging" = "yes" ]; then + PARAMS="$PARAMS -o /var/log/x11vnc.log" + fi - # shared desktops - if [ "$x11vnc_shared" = "1" -o "$x11vnc_shared" = "yes" ]; then - PARAMS="$PARAMS -shared" - fi + # shared desktops + if [ "$x11vnc_shared" = "1" -o "$x11vnc_shared" = "yes" ]; then + PARAMS="$PARAMS -shared" + fi - # scale desktop - if [ "$x11vnc_scale" != "" ]; then - $PARAMS="$PARAMS -scale $x11vnc_scale" - fi + # scale desktop + if [ "$x11vnc_scale" != "" ]; then + $PARAMS="$PARAMS -scale $x11vnc_scale" + fi - # write config file - echo "# parameters generated by $0" > /mnt/etc/x11vnc/x11vnc.conf - echo "X11VNC_PARAMS=\"$PARAMS\"" >> /mnt/etc/x11vnc/x11vnc.conf - echo "X11VNC_X11=\"$X11VNC_X11\"" >> /mnt/etc/x11vnc/x11vnc.conf + # write config file + echo "# parameters generated by $0" > /mnt/etc/x11vnc/x11vnc.conf + echo "X11VNC_PARAMS=\"$PARAMS\"" >> /mnt/etc/x11vnc/x11vnc.conf + echo "X11VNC_X11=\"$X11VNC_X11\"" >> /mnt/etc/x11vnc/x11vnc.conf - rllinker "x11vnc" 30 10 + rllinker "x11vnc" 30 10 - [ $DEBUGLEVEL -gt 0 ] && echo "done with 'x11vnc' os-plugin ..."; + [ $DEBUGLEVEL -gt 0 ] && echo "done with 'x11vnc' os-plugin ..."; fi fi |