From 4a0ad227fecb47c3f7ff9800ca9c94222b87364f Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Tue, 5 Aug 2008 17:26:10 +0000 Subject: Migration steps for new stage3 in the plugin stage3 scripts (the use of /etc/sysconfig/config is deprecated) ... git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1957 95ad53e4-c205-0410-b2fa-d234c58c8868 --- os-plugins/plugins/bootsplash/XX_bootsplash.sh | 15 ++++- os-plugins/plugins/desktop/XX_desktop.sh | 15 ++++- os-plugins/plugins/vmchooser/XX_vmchooser.sh | 13 ++++ os-plugins/plugins/vmware/XX_vmware.sh | 2 +- os-plugins/plugins/x11vnc/XX_x11vnc.sh | 92 ++++++++++++++------------ 5 files changed, 88 insertions(+), 49 deletions(-) diff --git a/os-plugins/plugins/bootsplash/XX_bootsplash.sh b/os-plugins/plugins/bootsplash/XX_bootsplash.sh index 1567ef3a..13b022cc 100644 --- a/os-plugins/plugins/bootsplash/XX_bootsplash.sh +++ b/os-plugins/plugins/bootsplash/XX_bootsplash.sh @@ -1,10 +1,21 @@ -#! /bin/sh +#!/bin/ash +# +# Copyright (c) 2007..2008 - RZ Uni Freiburg +# Copyright (c) 2008 - OpenSLX GmbH +# +# This program/file is free software distributed under the GPL version 2. +# See http://openslx.org/COPYING +# +# If you have any feedback please consult http://openslx.org/feedback and +# send your feedback to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org # # stage3 part of 'bootsplash' plugin - the runlevel script # . /etc/functions . /etc/distro-functions -. /etc/sysconfig/config +[ -d /etc/sysconfig ] && . /etc/sysconfig/config if [ -e /initramfs/plugin-conf/bootsplash.conf ]; then . /initramfs/plugin-conf/bootsplash.conf if [ $bootsplash_active -ne 0 ]; then diff --git a/os-plugins/plugins/desktop/XX_desktop.sh b/os-plugins/plugins/desktop/XX_desktop.sh index cfea19b0..c014c829 100644 --- a/os-plugins/plugins/desktop/XX_desktop.sh +++ b/os-plugins/plugins/desktop/XX_desktop.sh @@ -1,10 +1,21 @@ -#! /bin/ash +#!/bin/ash +# +# Copyright (c) 2007..2008 - RZ Uni Freiburg +# Copyright (c) 2008 - OpenSLX GmbH +# +# This program/file is free software distributed under the GPL version 2. +# See http://openslx.org/COPYING +# +# If you have any feedback please consult http://openslx.org/feedback and +# send your feedback to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org # # stage3 part of 'desktop' plugin - the runlevel script # . /etc/functions . /etc/distro-functions -. /etc/sysconfig/config +[ -d /etc/sysconfig ] && . /etc/sysconfig/config if [ -e /initramfs/plugin-conf/desktop.conf ]; then . /initramfs/plugin-conf/desktop.conf if [ $desktop_active -ne 0 ]; then diff --git a/os-plugins/plugins/vmchooser/XX_vmchooser.sh b/os-plugins/plugins/vmchooser/XX_vmchooser.sh index 93a93b13..1bc964d0 100644 --- a/os-plugins/plugins/vmchooser/XX_vmchooser.sh +++ b/os-plugins/plugins/vmchooser/XX_vmchooser.sh @@ -1,3 +1,16 @@ +#!/bin/ash +# +# Copyright (c) 2008 - RZ Uni Freiburg +# Copyright (c) 2008 - OpenSLX GmbH +# +# This program/file is free software distributed under the GPL version 2. +# See http://openslx.org/COPYING +# +# If you have any feedback please consult http://openslx.org/feedback and +# send your feedback to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org +# CONFFILE="/initramfs/plugin-conf/vmchooser.conf" diff --git a/os-plugins/plugins/vmware/XX_vmware.sh b/os-plugins/plugins/vmware/XX_vmware.sh index 570bdb5a..a10808d6 100644 --- a/os-plugins/plugins/vmware/XX_vmware.sh +++ b/os-plugins/plugins/vmware/XX_vmware.sh @@ -1,6 +1,6 @@ #!/bin/ash # -# Copyright (c) 2007, 2008 - RZ Uni Freiburg +# Copyright (c) 2007..2008 - RZ Uni Freiburg # Copyright (c) 2008 - OpenSLX GmbH # # This program/file is free software distributed under the GPL version 2. diff --git a/os-plugins/plugins/x11vnc/XX_x11vnc.sh b/os-plugins/plugins/x11vnc/XX_x11vnc.sh index 2b640885..327d247a 100644 --- a/os-plugins/plugins/x11vnc/XX_x11vnc.sh +++ b/os-plugins/plugins/x11vnc/XX_x11vnc.sh @@ -1,51 +1,55 @@ -#! /bin/sh +#!/bin/ash +# +# Copyright (c) 2007..2008 - RZ Uni Freiburg +# Copyright (c) 2008 - OpenSLX GmbH +# +# This program/file is free software distributed under the GPL version 2. +# See http://openslx.org/COPYING +# +# If you have any feedback please consult http://openslx.org/feedback and +# send your feedback to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org # [ -e /etc/functions ] && . /etc/functions [ -e /etc/distro-functions ] && . /etc/distro-functions -[ -e /etc/sysconfig/config ] && . /etc/sysconfig/config +[ -d /etc/sysconfig ] && . /etc/sysconfig/config if [ -e /initramfs/plugin-conf/x11vnc.conf ]; then - . /initramfs/plugin-conf/x11vnc.conf - 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 - - # default parameters - PARAMS="-bg -forever" - - # client restrictions - if [ -z x11vnc_allowed_hosts ]; then - PARAMS="$PARAMS -allow $x11vnc_allowd_hosts" - fi - - # mode - case "$x11vnc_mode" in - x11) - PARAMS="$PARAMS -display :0" - X11VNC_X11=1 - ;; - fb) - PARAMS="$PARAMS -rawfb console" - ;; - esac - - # auth type - case "$x11vnc_auth_type" in - passwd) - # use x11vnc passwd style - recommended - echo "$x11vnc_pass" > /mnt/etc/x11vnc/passwd - echo "__BEGIN_VIEWONLY__" >> /mnt/etc/x11vnc/passwd - echo "$x11vnc_viewonlypass" >> /mnt/etc/x11vnc/passwd - - # multiuser handling - sed -i "s/,/\n/" /mnt/etc/x11vnc/passwd - - # add parameter to commandline - PARAMS="$PARAMS -passwdfile rm:/etc/x11vnc/passwd" - ;; - rfbauth) + . /initramfs/plugin-conf/x11vnc.conf + 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 + # default parameters + PARAMS="-bg -forever" + # client restrictions + if [ -z x11vnc_allowed_hosts ]; then + PARAMS="$PARAMS -allow $x11vnc_allowd_hosts" + fi + # mode + case "$x11vnc_mode" in + x11) + PARAMS="$PARAMS -display :0" + X11VNC_X11=1 + ;; + fb) + PARAMS="$PARAMS -rawfb console" + ;; + esac + # auth type + case "$x11vnc_auth_type" in + passwd) + # use x11vnc passwd style - recommended + echo "$x11vnc_pass" > /mnt/etc/x11vnc/passwd + echo "__BEGIN_VIEWONLY__" >> /mnt/etc/x11vnc/passwd + echo "$x11vnc_viewonlypass" >> /mnt/etc/x11vnc/passwd + # multiuser handling + sed -i "s/,/\n/" /mnt/etc/x11vnc/passwd + # 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" @@ -89,5 +93,5 @@ if [ -e /initramfs/plugin-conf/x11vnc.conf ]; then rllinker "x11vnc" 30 10 [ $DEBUGLEVEL -gt 0 ] && echo "done with 'x11vnc' os-plugin ..."; - fi + fi fi -- cgit v1.2.3-55-g7522