diff options
author | Michael Janczyk | 2009-10-23 19:26:38 +0200 |
---|---|---|
committer | Michael Janczyk | 2009-10-23 19:26:38 +0200 |
commit | 71ecbe8e688b11dd3baf8dc1c41d3b355eac01c6 (patch) | |
tree | 7a67be8cbd836335409353bf1c6de05f7047f038 /os-plugins/plugins | |
parent | moving tested theming stuff to 5.0 (diff) | |
download | core-71ecbe8e688b11dd3baf8dc1c41d3b355eac01c6.tar.gz core-71ecbe8e688b11dd3baf8dc1c41d3b355eac01c6.tar.xz core-71ecbe8e688b11dd3baf8dc1c41d3b355eac01c6.zip |
default directories introduced. please test and say what you think. examples see plugins vmware and vmchooser. can be simplyfied further (VIRTDIR, ETC...). /opt/openslx can bu user for plugins, ect as well (maybe PLUGINDIR?).
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@3177 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins')
-rw-r--r--[-rwxr-xr-x] | os-plugins/plugins/desktop/themes/gdm/openslx/theme.xml | 80 | ||||
-rw-r--r-- | os-plugins/plugins/desktop/themes/kdm/openslx/theme.xml | 54 | ||||
-rw-r--r-- | os-plugins/plugins/vmchooser/XX_vmchooser.sh | 35 | ||||
-rw-r--r-- | os-plugins/plugins/vmchooser/files/run-virt.sh | 5 | ||||
-rw-r--r-- | os-plugins/plugins/vmware/XX_vmware.sh | 13 | ||||
-rw-r--r-- | os-plugins/plugins/vmware/files/run-virt.include | 9 |
6 files changed, 104 insertions, 92 deletions
diff --git a/os-plugins/plugins/desktop/themes/gdm/openslx/theme.xml b/os-plugins/plugins/desktop/themes/gdm/openslx/theme.xml index 0706e8f0..46ef334e 100755..100644 --- a/os-plugins/plugins/desktop/themes/gdm/openslx/theme.xml +++ b/os-plugins/plugins/desktop/themes/gdm/openslx/theme.xml @@ -5,13 +5,13 @@ GDM-OpenSLX-Theme --> <greeter id="theme"> - <!-- background --> + <!-- background --> <item type="pixmap" id="background" background="true"> <normal file="color.png"/> <pos x="0" y="0" width="100%" height="100%"/> </item> - <!-- top / welcome, clock and big logo --> + <!-- top / welcome, clock and big logo --> <item type="rect" id="top" background="true"> <normal color="#000000" alpha="0.0"/> <pos anchor="n" x="50%" y="0" width="100%" height="40%"/> @@ -21,14 +21,14 @@ GDM-OpenSLX-Theme <normal file="welcome-time-shadowed.png"/> <pos anchor="n" x="50%" y="0" width="80%" height="44"/> <box orientation="horizontal" homogeneous="true"> - <!-- Welcome on ... --> + <!-- Welcome on ... --> <item type="label" background="true"> <pos anchor="w" x="10%" y="30%"/> <normal color="#f0f0f0" font="Sans 11"/> <stock type="welcome-label"/> </item> <!-- clock --> - <item type="label" id="clock" background="true"> + <item type="label" id="clock"> <pos anchor="e" x="90%" y="30%"/> <normal color="#f0f0f0" font="Sans 11"/> <text>%c</text> @@ -50,7 +50,7 @@ GDM-OpenSLX-Theme </box> </item> - <!-- main part / login, session, menu, ... --> + <!-- main part / login, session, menu, ... --> <item type="pixmap" id="main-runner" background="true"> <normal file="main-runner.png"/> <pos anchor="c" x="50%" y="50%" width="100%" height="160"/> @@ -61,13 +61,13 @@ GDM-OpenSLX-Theme <pos anchor="w" x="0%" y="50%" width="100%" height="100%"/> <box orientation="horizontal" homogeneous="true"> - <!-- left part / login --> + <!-- left part / login --> <item type="rect" background="true"> <normal color="#000000" alpha="0.0"/> <pos anchor="w" x="0" y="50%" width="100%" height="100%"/> <box orientation="horizontal"> - <!-- small logo --> + <!-- small logo --> <item type="pixmap" background="true"> <normal file="openslx-logo.png"/> <pos anchor="w" x="30" y="50%"/> @@ -91,16 +91,16 @@ GDM-OpenSLX-Theme </box> </item> - </box> + </box> </item> - <!-- middle part / errors, caps info, kdm logo --> + <!-- middle part / errors, caps info, gdm logo --> <item type="rect"> <normal color="#000000" alpha="0.0"/> <pos anchor="c" x="50%" y="50%" width="90%" height="100%"/> - <box orientation="vertical"> + <box orientation="vertical"> - <!-- Login-Error --> + <!-- Login-Error --> <item type="rect"> <normal color="#000000" alpha="0.0"/> <pos anchor="n" x="50%" y="10" width="100%" height="30"/> @@ -118,8 +118,8 @@ GDM-OpenSLX-Theme <pos anchor="c" x="50%" y="50%"/> </item> - <!-- capslock-warning --> - <item type="rect" id="caps-lock-warning"> + <!-- capslock-warning --> + <item type="rect" id="caps-lock-warning"> <normal color="#000000" alpha="0.4"/> <pos anchor="s" x="50%" y="-10" width="100%" height="30"/> <box> @@ -134,7 +134,7 @@ GDM-OpenSLX-Theme </box> </item> - <!-- right part / sessions, menu --> + <!-- right part / sessions, menu --> <item type="rect"> <normal color="#000000" alpha="0.0"/> <pos anchor="e" x="100%" y="50%" width="100%" height="100%"/> @@ -164,7 +164,7 @@ GDM-OpenSLX-Theme </box> </item> - <!-- menu-button --> + <!-- menu-button --> <item type="rect" id="system_button" button="true"> <normal color="#000000" alpha="0.0"/> <pos anchor="ne" x="-50" y="0" width="box" height="box"/> @@ -188,37 +188,37 @@ GDM-OpenSLX-Theme </box> </item> - </box> + </box> </item> </box> </item> - </box> + </box> </item> - <!-- language-button --> - <item type="rect" id="language_button" button="true"> - <normal color="#000000" alpha="0.0"/> - <pos anchor="se" x="-10" y="-10" width="box" height="box"/> - <box orientation="horizontal"> - <item type="label"> - <normal color="#3e5d72" font="Sans 11"/> - <prelight color="#557f9c" font="Sans 11"/> - <active color="#ff8b00" font="Sans 11"/> - <pos anchor="e" x="100%" y="16"/> - <stock type="language"/> - </item> - <item type="rect" id="language_button" button="true"> - <normal color="#000000" alpha="0.0"/> - <pos anchor="c" x="50%" y="50%" width="10"/> - </item> - <item type="pixmap" id="language_button" button="true"> - <normal file="language-selector_inactive.png"/> - <prelight file="language-selector.png"/> - <pos anchor="ne" x="100%" y="0%"/> - </item> - </box> - </item> + <!-- language-button --> + <item type="rect" id="language_button" button="true"> + <normal color="#000000" alpha="0.0"/> + <pos anchor="se" x="-10" y="-10" width="box" height="box"/> + <box orientation="horizontal"> + <item type="label"> + <normal color="#3e5d72" font="Sans 11"/> + <prelight color="#557f9c" font="Sans 11"/> + <active color="#ff8b00" font="Sans 11"/> + <pos anchor="e" x="100%" y="16"/> + <stock type="language"/> + </item> + <item type="rect" id="language_button" button="true"> + <normal color="#000000" alpha="0.0"/> + <pos anchor="c" x="50%" y="50%" width="10"/> + </item> + <item type="pixmap" id="language_button" button="true"> + <normal file="language-selector_inactive.png"/> + <prelight file="language-selector.png"/> + <pos anchor="ne" x="100%" y="0%"/> + </item> + </box> + </item> </greeter> diff --git a/os-plugins/plugins/desktop/themes/kdm/openslx/theme.xml b/os-plugins/plugins/desktop/themes/kdm/openslx/theme.xml index 4af39bdf..d748c776 100644 --- a/os-plugins/plugins/desktop/themes/kdm/openslx/theme.xml +++ b/os-plugins/plugins/desktop/themes/kdm/openslx/theme.xml @@ -4,15 +4,15 @@ KDM-OpenSLX-Theme --> <greeter id="theme"> - <style font="Sans 11" window-text-color="#f0f0f0" base-color="#f0f0f0" text-color="#000000"/> + <style font="Sans 11" window-text-color="#f0f0f0" base-color="#f0f0f0" text-color="#000000"/> - <!-- background --> + <!-- background --> <item type="pixmap" id="background" background="true"> <normal file="color.png"/> <pos x="0" y="0" width="100%" height="100%"/> </item> - <!-- top / welcome, clock and big logo --> + <!-- top / welcome, clock and big logo --> <item type="rect" id="top" background="true"> <normal color="#000000" alpha="0.0"/> <pos anchor="n" x="50%" y="0" width="100%" height="40%"/> @@ -22,14 +22,14 @@ KDM-OpenSLX-Theme <normal file="welcome-time-shadowed.png"/> <pos anchor="n" x="50%" y="0" width="80%" height="44"/> <box orientation="horizontal" homogeneous="true"> - <!-- Welcome on ... --> + <!-- Welcome on ... --> <item type="label" background="true"> <pos anchor="w" x="10%" y="30%"/> <normal color="#f0f0f0" font="Sans 11"/> <stock type="welcome-label"/> </item> - <!-- clock --> - <item type="label" id="clock" background="true"> + <!-- clock --> + <item type="label" id="clock"> <pos anchor="e" x="90%" y="30%"/> <normal color="#f0f0f0" font="Sans 11"/> <text>%c</text> @@ -51,7 +51,7 @@ KDM-OpenSLX-Theme </box> </item> - <!-- main part / login, session, menu, ... --> + <!-- main part / login, session, menu, ... --> <item type="pixmap" id="main-runner" background="true"> <normal file="main-runner.png"/> <pos anchor="c" x="50%" y="50%" width="100%" height="160"/> @@ -62,19 +62,19 @@ KDM-OpenSLX-Theme <pos anchor="w" x="0%" y="50%" width="100%" height="100%"/> <box orientation="horizontal" homogeneous="true"> - <!-- left part / login --> + <!-- left part / login --> <item type="rect" background="true"> <normal color="#000000" alpha="0.0"/> <pos anchor="w" x="0" y="50%" width="100%" height="100%"/> <box orientation="horizontal"> - <!-- small logo --> + <!-- small logo --> <item type="pixmap" background="true"> <normal file="openslx-logo.png"/> <pos anchor="w" x="30" y="50%"/> </item> - <!-- login --> + <!-- login --> <item type="rect"> <normal color="#000000" alpha="0.0"/> <pos anchor="w" x="70" y="50%" width="box" height="box"/> @@ -99,7 +99,7 @@ KDM-OpenSLX-Theme </box> </item> - <item type="rect"> + <item type="rect"> <normal color="#000000" alpha="0.0"/> <pos anchor="nw" x="0" y="0" width="box" height="box"/> <box homogeneous="true" spacing="10"> @@ -112,27 +112,27 @@ KDM-OpenSLX-Theme <pos anchor="w" x="0" y="50%" height="20" width="100"/> </item> </box> - </item> + </item> - <item type="pixmap" button="true" id="login_button"> - <pos anchor="sw" x="0" y="-0" height="20" width="20"/> - <normal file="enter_inactive.png"/> - <prelight file="enter.png"/> - </item> + <item type="pixmap" button="true" id="login_button"> + <pos anchor="sw" x="0" y="-0" height="20" width="20"/> + <normal file="enter_inactive.png"/> + <prelight file="enter.png"/> + </item> </box> </item> - </box> + </box> </item> - <!-- middle part / errors, caps info, kdm logo --> + <!-- middle part / errors, caps info, kdm logo --> <item type="rect"> <normal color="#000000" alpha="0.0"/> <pos anchor="c" x="50%" y="50%" width="90%" height="100%"/> - <box orientation="vertical"> + <box orientation="vertical"> - <!-- Login-Error --> + <!-- Login-Error --> <item type="rect"> <normal color="#000000" alpha="0.0"/> <pos anchor="n" x="50%" y="10" width="100%" height="30"/> @@ -150,8 +150,8 @@ KDM-OpenSLX-Theme <pos anchor="c" x="50%" y="50%"/> </item> - <!-- capslock-warning --> - <item type="rect" id="caps-lock-warning"> + <!-- capslock-warning --> + <item type="rect" id="caps-lock-warning"> <normal color="#000000" alpha="0.4"/> <pos anchor="s" x="50%" y="-10" width="100%" height="30"/> <box> @@ -166,7 +166,7 @@ KDM-OpenSLX-Theme </box> </item> - <!-- right part / sessions, menu --> + <!-- right part / sessions, menu --> <item type="rect"> <normal color="#000000" alpha="0.0"/> <pos anchor="e" x="100%" y="50%" width="100%" height="100%"/> @@ -196,7 +196,7 @@ KDM-OpenSLX-Theme </box> </item> - <!-- menu-button --> + <!-- menu-button --> <item type="rect" id="system_button" button="true"> <normal color="#000000" alpha="0.0"/> <pos anchor="ne" x="-50" y="0" width="box" height="box"/> @@ -220,13 +220,13 @@ KDM-OpenSLX-Theme </box> </item> - </box> + </box> </item> </box> </item> - </box> + </box> </item> </greeter> diff --git a/os-plugins/plugins/vmchooser/XX_vmchooser.sh b/os-plugins/plugins/vmchooser/XX_vmchooser.sh index 65e23d4e..1cb827a3 100644 --- a/os-plugins/plugins/vmchooser/XX_vmchooser.sh +++ b/os-plugins/plugins/vmchooser/XX_vmchooser.sh @@ -12,14 +12,19 @@ # script is included from init via the "." load function - thus it has all # variables and functions available +# include default directories +. /etc/openslx.conf + CONFFILE="/initramfs/plugin-conf/vmchooser.conf" +ETCDIR=/mnt/${OPENSLX_DEFAULT_CONFDIR} +VIRTDIR=/mnt/${OPENSLX_DEFAULT_VIRTDIR} if [ -e $CONFFILE ]; then . $CONFFILE if [ $vmchooser_active -ne 0 ] ; then - [ $DEBUGLEVEL -gt 0 ] && echo "vmchooser: copying stage3 configuration file ..." - testmkd /mnt/etc/opt/openslx - cp $CONFFILE /mnt/etc/opt/openslx/vmchooser-stage3.conf + [ $DEBUGLEVEL -gt 0 ] \ + && echo "vmchooser: copying stage3 configuration file ..." + cp $CONFFILE ${ETCDIR}/vmchooser-stage3.conf testmkd /mnt/var/X11R6/bin ln -s /opt/openslx/plugin-repo/vmchooser/run-virt.sh \ @@ -28,8 +33,8 @@ if [ -e $CONFFILE ]; then /mnt/var/X11R6/bin/vmchooser # setup all generic virtualization / starting stuff like the floppy image - testmkd /mnt/var/lib/virt/vmchooser/fd-loop 1777 - testmkd /mnt/var/lib/virt/vmchooser/loopimg + testmkd ${VIRTDIR}/vmchooser/fd-loop 1777 + testmkd ${VIRTDIR}/vmchooser/loopimg # loop file for exchanging information between linux and vm guest if modprobe ${MODPRV} loop; then @@ -39,32 +44,32 @@ if [ -e $CONFFILE ]; then fi # mount a clean tempfs (bug in UnionFS prevents loopmount to work) grep -qE "unionfs |aufs " /proc/mounts && \ - mount -n -o size=1500k -t tmpfs vm-loopimg /mnt/var/lib/virt/vmchooser/loopimg + mount -n -o size=1500k -t tmpfs vm-loopimg ${VIRTDIR}/vmchooser/loopimg # create an empty floppy image of 1.4MByte size - dd if=/dev/zero of=/mnt/var/lib/virt/vmchooser/loopimg/fd.img \ - count=2880 bs=512 2>/dev/null - chmod 0777 /mnt/var/lib/virt/vmchooser/loopimg/fd.img + dd if=/dev/zero of=${VIRTDIR}/vmchooser/loopimg/fd.img count=2880 bs=512 \ + 2>/dev/null + chmod 0777 ${VIRTDIR}/vmchooser/loopimg/fd.img # use dos formatter copied into stage3 - mkdosfs /mnt/var/lib/virt/vmchooser/loopimg/fd.img >/dev/null 2>&1 #|| error - mount -n -t msdos -o loop,umask=000 /mnt/var/lib/virt/vmchooser/loopimg/fd.img \ - /mnt/var/lib/virt/vmchooser/fd-loop + mkdosfs ${VIRTDIR}/vmchooser/loopimg/fd.img >/dev/null 2>&1 #|| error + mount -n -t msdos -o loop,umask=000 ${VIRTDIR}/vmchooser/loopimg/fd.img \ + ${VIRTDIR}/vmchooser/fd-loop # create run-virt.include header (and fill in information on removable # devices if present echo -e "# run-virt.include created by $0 during stage3 plugin setup" \ - >/mnt/etc/opt/openslx/run-virt.include + >${ETCDIR}/run-virt.include waitfor /etc/hwinfo.cdrom j=0 for i in $(cat /etc/hwinfo.cdrom); do - echo "cdrom_$j=$i" >>/mnt/etc/opt/openslx/run-virt.include + echo "cdrom_$j=$i" >>${ETCDIR}/run-virt.include j=$(expr $j + 1) done waitfor /etc/hwinfo.floppy j=0 for i in $(cat /etc/hwinfo.floppy); do - echo "floppy_$j=$i" >>/mnt/etc/opt/openslx/run-virt.include + echo "floppy_$j=$i" >>${ETCDIR}/run-virt.include j=$(expr $j + 1) done diff --git a/os-plugins/plugins/vmchooser/files/run-virt.sh b/os-plugins/plugins/vmchooser/files/run-virt.sh index ee9c8124..910cf128 100644 --- a/os-plugins/plugins/vmchooser/files/run-virt.sh +++ b/os-plugins/plugins/vmchooser/files/run-virt.sh @@ -18,6 +18,9 @@ # fied virtualization tool. # ----------------------------------------------------------------------------- +# include default directories +. /etc/opt/openslx/openslx.conf + # Sanity checks ############################################################################### @@ -185,7 +188,7 @@ writelog () echo -e "$1" # Log into file - echo -e "$1" >>/tmp/run-virt.$$.log + echo -e "$1" >> ${OPENSLX_DEFAULT_LOGDIR}/run-virt.${USER}.$$.log } # Setup the rest of the environment and run the virtualization tool just confi- diff --git a/os-plugins/plugins/vmware/XX_vmware.sh b/os-plugins/plugins/vmware/XX_vmware.sh index 5068c0f6..34bb8067 100644 --- a/os-plugins/plugins/vmware/XX_vmware.sh +++ b/os-plugins/plugins/vmware/XX_vmware.sh @@ -16,6 +16,12 @@ # write /etc/vmware/config (if a non-standard location of vmware basedir is # to be configured), /etc/init.d/vmware +# include default directories +. /etc/openslx.conf + +ETCDIR=/mnt/${OPENSLX_DEFAULT_CONFDIR} +VIRTDIR=/mnt/${OPENSLX_DEFAULT_VIRTDIR} + # check if the configuration file is available if [ -e /initramfs/plugin-conf/vmware.conf ]; then @@ -154,7 +160,7 @@ $(ipcalc -m $vmip/$vmpx|sed s/.*=//) {" \ vmimgpath="$(uri_token ${vmware_imagesrc} path)" fi if [ -n "${vmimgserv}" -a -n ${vmimgpath} -a -n ${vmimgprot} ] ; then - mnttarget=/mnt/var/lib/virt/vmware + mnttarget=${VIRTDIR}/vmware # mount the vmware image source readonly (ro) fsmount ${vmimgprot} ${vmimgserv} ${vmimgpath} ${mnttarget} ro else @@ -196,12 +202,11 @@ prefvmx.useRecommendedLockedMemSize = "TRUE"' | sed -e "s/^ *//" \ # copy version depending files - the vmchooser expects for every virtua- # lization plugin a file named after it (here run-vmware.include) - testmkd /mnt/etc/opt/openslx cp /mnt/opt/openslx/plugin-repo/vmware/run-virt.include \ - /mnt/etc/opt/openslx/run-vmware.include + ${ETCDIR}/run-vmware.include # copy version depending files cp /mnt/opt/openslx/plugin-repo/vmware/${vmware_kind}/vmplayer \ - /mnt/var/X11R6/bin/vmplayer + /mnt/var/X11R6/bin/vmplayer if [ -e /mnt/opt/openslx/plugin-repo/vmware/${vmware_kind}/vmware ]; then cp /mnt/opt/openslx/plugin-repo/vmware/${vmware_kind}/vmware \ /mnt/var/X11R6/bin/vmware diff --git a/os-plugins/plugins/vmware/files/run-virt.include b/os-plugins/plugins/vmware/files/run-virt.include index 725ccb1c..a148442c 100644 --- a/os-plugins/plugins/vmware/files/run-virt.include +++ b/os-plugins/plugins/vmware/files/run-virt.include @@ -15,6 +15,8 @@ # - component for vmware/player of the vmchooser plugin run-virt.sh # ----------------------------------------------------------------------------- +# include default directories +. /etc/opt/openslx/openslx.conf # include general configuration from vmchooser . /etc/opt/openslx/run-virt.include @@ -211,6 +213,8 @@ confdir=${redodir} conffile="${confdir}/run-vmware.conf" # users vmware config folder vmhome="${HOME}/.vmware" +# logfile +logfile=${OPENSLX_DEFAULT_LOGDIR}/run-vmware.${USER}.$$.log # get several version infos for vmware/player . /etc/vmware/slxvmconfig @@ -376,11 +380,6 @@ done # logging and stdout ################################################################################ -logfile=${vmhome}/run-vmware.`hostname`.log - -# remove ols logs -rm ${vmhome}/run-vmware.* >/dev/null 2>&1 - # function to write to stdout and logfile writelog () { |