diff options
author | Dirk | 2012-12-15 00:57:08 +0100 |
---|---|---|
committer | Dirk | 2012-12-15 00:57:08 +0100 |
commit | 47e090aeb770bb53e7bd42d4742cf5b85ad54080 (patch) | |
tree | 23deaab88599bd2b55141f313b6ff05144956f14 /src/os-plugins | |
parent | ... (diff) | |
parent | FW is now automatically added to the initramfs. Checks are done with modinfo. (diff) | |
download | core-47e090aeb770bb53e7bd42d4742cf5b85ad54080.tar.gz core-47e090aeb770bb53e7bd42d4742cf5b85ad54080.tar.xz core-47e090aeb770bb53e7bd42d4742cf5b85ad54080.zip |
Merge branch 'master' of git.openslx.org:openslx/core
Diffstat (limited to 'src/os-plugins')
18 files changed, 309 insertions, 57 deletions
diff --git a/src/os-plugins/plugins/desktop/OpenSLX/Distro/Centos.pm b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Centos.pm new file mode 100644 index 00000000..8f726037 --- /dev/null +++ b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Centos.pm @@ -0,0 +1,31 @@ +# Copyright (c) 2006..2009 - OpenSLX GmbH
+#
+# This program 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 suggestions, praise, or complaints to feedback@openslx.org
+#
+# General information about OpenSLX can be found at http://openslx.org/
+# -----------------------------------------------------------------------------
+# desktop/OpenSLX/Distro/Centos.pm
+# - provides Centos Linux specific overrides of the Distro API for the
+# desktop plugin.
+# -----------------------------------------------------------------------------
+package desktop::OpenSLX::Distro::Centos;
+
+use strict;
+use warnings;
+
+use base qw(desktop::OpenSLX::Distro::Rhel);
+
+use File::Path;
+
+use OpenSLX::Basics;
+use OpenSLX::Utils;
+
+################################################################################
+### interface methods
+################################################################################
+
+1;
diff --git a/src/os-plugins/plugins/desktop/OpenSLX/Distro/Scilin.pm b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Rhel.pm index 1dc0482c..9a04afc4 100644 --- a/src/os-plugins/plugins/desktop/OpenSLX/Distro/Scilin.pm +++ b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Rhel.pm @@ -8,11 +8,11 @@ #
# General information about OpenSLX can be found at http://openslx.org/
# -----------------------------------------------------------------------------
-# desktop/OpenSLX/Distro/Scilin.pm
-# - provides Scilin-specific overrides of the Distro API for the desktop
+# desktop/OpenSLX/Distro/Rhel.pm
+# - provides RHEL specific overrides of the Distro API for the desktop
# plugin.
# -----------------------------------------------------------------------------
-package desktop::OpenSLX::Distro::Scilin;
+package desktop::OpenSLX::Distro::Rhel;
use strict;
use warnings;
diff --git a/src/os-plugins/plugins/desktop/OpenSLX/Distro/Scientific.pm b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Scientific.pm new file mode 100644 index 00000000..9f2eedbc --- /dev/null +++ b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Scientific.pm @@ -0,0 +1,31 @@ +# Copyright (c) 2006..2009 - OpenSLX GmbH
+#
+# This program 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 suggestions, praise, or complaints to feedback@openslx.org
+#
+# General information about OpenSLX can be found at http://openslx.org/
+# -----------------------------------------------------------------------------
+# desktop/OpenSLX/Distro/Scientific.pm
+# - provides Scientific Linux specific overrides of the Distro API for the
+# desktop plugin.
+# -----------------------------------------------------------------------------
+package desktop::OpenSLX::Distro::Scientific;
+
+use strict;
+use warnings;
+
+use base qw(desktop::OpenSLX::Distro::Rhel);
+
+use File::Path;
+
+use OpenSLX::Basics;
+use OpenSLX::Utils;
+
+################################################################################
+### interface methods
+################################################################################
+
+1;
diff --git a/src/os-plugins/plugins/infoscreen/OpenSLX/Distro/Centos.pm b/src/os-plugins/plugins/infoscreen/OpenSLX/Distro/Centos.pm new file mode 100644 index 00000000..2f0ad7cd --- /dev/null +++ b/src/os-plugins/plugins/infoscreen/OpenSLX/Distro/Centos.pm @@ -0,0 +1,29 @@ +# Copyright (c) 2009 - OpenSLX GmbH +# +# This program 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 suggestions, praise, or complaints to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org/ +# ----------------------------------------------------------------------------- +# infoscreen/OpenSLX/Distro/Centos.pm +# - provides Centos Linux specific overrides of the Distro API for the +# infoscreen plugin. +# ----------------------------------------------------------------------------- +package infoscreen::OpenSLX::Distro::Centos; + +use strict; +use warnings; + +use base qw(infoscreen::OpenSLX::Distro::Rhel); + +use OpenSLX::Basics; +use OpenSLX::Utils; + +################################################################################ +### interface methods +################################################################################ + +1; diff --git a/src/os-plugins/plugins/infoscreen/OpenSLX/Distro/Scilin.pm b/src/os-plugins/plugins/infoscreen/OpenSLX/Distro/Rhel.pm index e89d6d88..a5988166 100644 --- a/src/os-plugins/plugins/infoscreen/OpenSLX/Distro/Scilin.pm +++ b/src/os-plugins/plugins/infoscreen/OpenSLX/Distro/Rhel.pm @@ -8,11 +8,11 @@ # # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- -# infoscreen/OpenSLX/Distro/Scilin.pm -# - provides Scilin-specific overrides of the Distro API for the infoscreen +# infoscreen/OpenSLX/Distro/Rhel.pm +# - provides RHEL specific overrides of the Distro API for the infoscreen # plugin. # ----------------------------------------------------------------------------- -package infoscreen::OpenSLX::Distro::Scilin; +package infoscreen::OpenSLX::Distro::Rhel; use strict; use warnings; @@ -26,7 +26,4 @@ use OpenSLX::Utils; ### interface methods ################################################################################ - - - 1; diff --git a/src/os-plugins/plugins/infoscreen/OpenSLX/Distro/Scientific.pm b/src/os-plugins/plugins/infoscreen/OpenSLX/Distro/Scientific.pm new file mode 100644 index 00000000..5f791132 --- /dev/null +++ b/src/os-plugins/plugins/infoscreen/OpenSLX/Distro/Scientific.pm @@ -0,0 +1,29 @@ +# Copyright (c) 2009 - OpenSLX GmbH +# +# This program 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 suggestions, praise, or complaints to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org/ +# ----------------------------------------------------------------------------- +# infoscreen/OpenSLX/Distro/Scientific.pm +# - provides Scientific Linux specific overrides of the Distro API for the +# infoscreen plugin. +# ----------------------------------------------------------------------------- +package infoscreen::OpenSLX::Distro::Scientific; + +use strict; +use warnings; + +use base qw(infoscreen::OpenSLX::Distro::Rhel); + +use OpenSLX::Basics; +use OpenSLX::Utils; + +################################################################################ +### interface methods +################################################################################ + +1; diff --git a/src/os-plugins/plugins/kiosk/OpenSLX/Distro/Centos.pm b/src/os-plugins/plugins/kiosk/OpenSLX/Distro/Centos.pm new file mode 100644 index 00000000..68877fd7 --- /dev/null +++ b/src/os-plugins/plugins/kiosk/OpenSLX/Distro/Centos.pm @@ -0,0 +1,29 @@ +# Copyright (c) 2009 - OpenSLX GmbH +# +# This program 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 suggestions, praise, or complaints to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org/ +# ----------------------------------------------------------------------------- +# kiosk/OpenSLX/Distro/Centos.pm +# - provides Centos Linux specific overrides of the Distro API for the +# kiosk plugin. +# ----------------------------------------------------------------------------- +package kiosk::OpenSLX::Distro::Centos; + +use strict; +use warnings; + +use base qw(kiosk::OpenSLX::Distro::Rhel); + +use OpenSLX::Basics; +use OpenSLX::Utils; + +################################################################################ +### interface methods +################################################################################ + +1; diff --git a/src/os-plugins/plugins/kiosk/OpenSLX/Distro/Scilin.pm b/src/os-plugins/plugins/kiosk/OpenSLX/Distro/Rhel.pm index 7423a3b8..6c0f9c9f 100644 --- a/src/os-plugins/plugins/kiosk/OpenSLX/Distro/Scilin.pm +++ b/src/os-plugins/plugins/kiosk/OpenSLX/Distro/Rhel.pm @@ -8,11 +8,10 @@ # # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- -# kiosk/OpenSLX/Distro/Scilin.pm -# - provides Scilin-specific overrides of the Distro API for the kiosk -# plugin. +# kiosk/OpenSLX/Distro/Rhel.pm +# - provides RHEL specific overrides of the Distro API for the kiosk plugin. # ----------------------------------------------------------------------------- -package kiosk::OpenSLX::Distro::Scilin; +package kiosk::OpenSLX::Distro::Rhel; use strict; use warnings; @@ -26,7 +25,4 @@ use OpenSLX::Utils; ### interface methods ################################################################################ - - - 1; diff --git a/src/os-plugins/plugins/kiosk/OpenSLX/Distro/Scientific.pm b/src/os-plugins/plugins/kiosk/OpenSLX/Distro/Scientific.pm new file mode 100644 index 00000000..4e664c76 --- /dev/null +++ b/src/os-plugins/plugins/kiosk/OpenSLX/Distro/Scientific.pm @@ -0,0 +1,29 @@ +# Copyright (c) 2009 - OpenSLX GmbH +# +# This program 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 suggestions, praise, or complaints to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org/ +# ----------------------------------------------------------------------------- +# kiosk/OpenSLX/Distro/Scientific.pm +# - provides Scientific Linux specific overrides of the Distro API for the +# kiosk plugin. +# ----------------------------------------------------------------------------- +package kiosk::OpenSLX::Distro::Scientific; + +use strict; +use warnings; + +use base qw(kiosk::OpenSLX::Distro::Rhel); + +use OpenSLX::Basics; +use OpenSLX::Utils; + +################################################################################ +### interface methods +################################################################################ + +1; diff --git a/src/os-plugins/plugins/profile/OpenSLX/Distro/Base.pm b/src/os-plugins/plugins/profile/OpenSLX/Distro/Base.pm index 5588a177..57fc3a27 100644 --- a/src/os-plugins/plugins/profile/OpenSLX/Distro/Base.pm +++ b/src/os-plugins/plugins/profile/OpenSLX/Distro/Base.pm @@ -62,7 +62,7 @@ sub getKdeHome { my $self = shift; - return ".openslx/unknown/kde"; + return ".openslx/general/kde"; } sub getGconfPathConfig @@ -77,7 +77,7 @@ sub getGconfHome { my $self = shift; - return ".openslx/unknown/gconf"; + return ".openslx/general/gconf"; } diff --git a/src/os-plugins/plugins/profile/OpenSLX/Distro/Centos.pm b/src/os-plugins/plugins/profile/OpenSLX/Distro/Centos.pm new file mode 100644 index 00000000..99d12703 --- /dev/null +++ b/src/os-plugins/plugins/profile/OpenSLX/Distro/Centos.pm @@ -0,0 +1,29 @@ +# Copyright (c) 2009 - OpenSLX GmbH +# +# This program 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 suggestions, praise, or complaints to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org/ +# ----------------------------------------------------------------------------- +# profile/OpenSLX/Distro/Centos.pm +# - provides Centos Linux specific overrides of the Distro API for the +# profile plugin. +# ----------------------------------------------------------------------------- +package profile::OpenSLX::Distro::Centos; + +use strict; +use warnings; + +use base qw(profile::OpenSLX::Distro::Rhel); + +use OpenSLX::Basics; +use OpenSLX::Utils; + +################################################################################ +### interface methods +################################################################################ + +1; diff --git a/src/os-plugins/plugins/profile/OpenSLX/Distro/Scilin.pm b/src/os-plugins/plugins/profile/OpenSLX/Distro/Rhel.pm index de66f02a..92d599d8 100644 --- a/src/os-plugins/plugins/profile/OpenSLX/Distro/Scilin.pm +++ b/src/os-plugins/plugins/profile/OpenSLX/Distro/Rhel.pm @@ -8,11 +8,11 @@ # # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- -# profile/OpenSLX/Distro/Scilin.pm -# - provides Scilin-specific overrides of the Distro API for the profile +# profile/OpenSLX/Distro/Rhel.pm +# - provides RHEL specific overrides of the Distro API for the profile # plugin. # ----------------------------------------------------------------------------- -package profile::OpenSLX::Distro::Scilin; +package profile::OpenSLX::Distro::Rhel; use strict; use warnings; @@ -26,7 +26,4 @@ use OpenSLX::Utils; ### interface methods ################################################################################ - - - 1; diff --git a/src/os-plugins/plugins/profile/OpenSLX/Distro/Scientific.pm b/src/os-plugins/plugins/profile/OpenSLX/Distro/Scientific.pm new file mode 100644 index 00000000..e040e3f8 --- /dev/null +++ b/src/os-plugins/plugins/profile/OpenSLX/Distro/Scientific.pm @@ -0,0 +1,29 @@ +# Copyright (c) 2009 - OpenSLX GmbH +# +# This program 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 suggestions, praise, or complaints to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org/ +# ----------------------------------------------------------------------------- +# profile/OpenSLX/Distro/Scientific.pm +# - provides Scientific Linux specific overrides of the Distro API for the +# profile plugin. +# ----------------------------------------------------------------------------- +package profile::OpenSLX::Distro::Scientific; + +use strict; +use warnings; + +use base qw(profile::OpenSLX::Distro::Rhel); + +use OpenSLX::Basics; +use OpenSLX::Utils; + +################################################################################ +### interface methods +################################################################################ + +1; diff --git a/src/os-plugins/plugins/profile/OpenSLX/Distro/Ubuntu_10.pm b/src/os-plugins/plugins/profile/OpenSLX/Distro/Ubuntu_10.pm index 3b288e97..0cee752d 100644 --- a/src/os-plugins/plugins/profile/OpenSLX/Distro/Ubuntu_10.pm +++ b/src/os-plugins/plugins/profile/OpenSLX/Distro/Ubuntu_10.pm @@ -45,7 +45,7 @@ sub getKdeHome { my $self = shift; - return ".openslx/ubuntu-lucid.kde"; + return ".openslx/ubuntu-10/kde"; } sub getGconfPathConfig @@ -60,7 +60,7 @@ sub getGconfHome { my $self = shift; - return ".openslx.ubuntu-lucid.gconf"; + return ".openslx/ubuntu-10/gconf"; } 1; diff --git a/src/os-plugins/plugins/sysrqshutdown/OpenSLX/OSPlugin/sysrqshutdown.pm b/src/os-plugins/plugins/sysrqshutdown/OpenSLX/OSPlugin/sysrqshutdown.pm index bfc274d4..07630fcb 100644 --- a/src/os-plugins/plugins/sysrqshutdown/OpenSLX/OSPlugin/sysrqshutdown.pm +++ b/src/os-plugins/plugins/sysrqshutdown/OpenSLX/OSPlugin/sysrqshutdown.pm @@ -70,22 +70,20 @@ sub installationPhase { my $self = shift; my $info = shift; - my $openslxBasePath = $info->{'openslx-base-path'}; - my $pluginName = $self->{'name'}; + my $openslxBasePath = $info->{'openslx-base-path'}; + my $pluginName = $self->{'name'}; my $pluginBasePath = "$openslxBasePath/lib/plugins/$pluginName/files"; + my $pluginDirPath = "/opt/openslx/plugin-repo/$pluginName"; # copy files if (! -e "/sbin/shutdown.slxorig") { system("mv /sbin/shutdown /sbin/shutdown.slxorig"); - system("cp -p $pluginBasePath/shutdown /sbin/; - cp -p $pluginBasePath/shutdown /opt/openslx/plugin-repo/$pluginName"); - chmod 0755, "/sbin/shutdown"; - } - # else assume reinstall - elsif (-e "/sbin/shutdown.slxorig") { - system("cp -p $pluginBasePath/shutdown /sbin/"); - chmod 0755, "/sbin/shutdown"; } + system("cp -p $pluginBasePath/shutdown /sbin/; + cp -p $pluginBasePath/shutdown $pluginDirPath; + cp -p $pluginBasePath/sysrqshutdown.sh $pluginDirPath"); + chmod 0755, "/sbin/shutdown", "$pluginDirPath/shutdown", + "$pluginDirPath/sysrqshutdown.sh"; return; } diff --git a/src/os-plugins/plugins/sysrqshutdown/files/shutdown b/src/os-plugins/plugins/sysrqshutdown/files/shutdown index a27481d7..1866d516 100644 --- a/src/os-plugins/plugins/sysrqshutdown/files/shutdown +++ b/src/os-plugins/plugins/sysrqshutdown/files/shutdown @@ -1,7 +1,7 @@ #!/bin/bash # ----------------------------------------------------------------------------- # Copyright (c) 2010 - RZ Uni FR -# Copyright (c) 2010 - OpenSLX GmbH +# Copyright (c) 2010 - 2012 OpenSLX GmbH # # This program is free software distributed under the GPL version 2. # See http://openslx.org/COPYING @@ -12,7 +12,7 @@ # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- # shutdown -# - Script for SYSRQ shutdown +# - Script which prepares for SYSRQ shutdown ################################################################################ . /etc/opt/openslx/openslx.conf @@ -22,30 +22,19 @@ ################################################################################ PLUGINCONFROOT=${OPENSLX_DEFAULT_CONFDIR}/plugins -PLUGINCONFVMGRID=${PLUGINCONFROOT}/sysrqshutdown -# include general configuration from vmgrid -if [ -f ${PLUGINCONFVMGRID}/sysrqshutdown.conf ]; then - . ${PLUGINCONFVMGRID}/sysrqshutdown.conf +PLUGINCONFSYSRQ=${PLUGINCONFROOT}/sysrqshutdown +PLUGINDIR=${OPENSLX_DEFAULT_DIR}/plugin-repo/sysrqshutdown + +# include general configuration from sysrqshutdown +if [ -f ${PLUGINCONFSYSRQ}/sysrqshutdown.conf ]; then + . ${PLUGINCONFSYSRQ}/sysrqshutdown.conf else sysrqshutdown_active=0 fi if [ ${sysrqshutdown_active} -eq 1 ]; then - # check if reboot or halt - if echo "$@" | grep -qe '-r now'; then - for i in $(echo s u b); do - echo $i > /proc/sysrq-trigger & - done - exit 0 - elif echo "$@" | grep -qe '-h now'; then - for i in $(echo s u o); do - echo $i > /proc/sysrq-trigger & - done - exit 0 - fi + nohup ${PLUGINDIR}/sysrqshutdown.sh $@ 2>/dev/null & fi -# else use orig shutdown -shutdown.slxorig $@ exit 0 diff --git a/src/os-plugins/plugins/sysrqshutdown/files/sysrqshutdown.sh b/src/os-plugins/plugins/sysrqshutdown/files/sysrqshutdown.sh new file mode 100644 index 00000000..7e575ed3 --- /dev/null +++ b/src/os-plugins/plugins/sysrqshutdown/files/sysrqshutdown.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# ----------------------------------------------------------------------------- +# Copyright (c) 2010 - RZ Uni FR +# Copyright (c) 2010 - 2012 OpenSLX GmbH +# +# This program 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 suggestions, praise, or complaints to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org/ +# ----------------------------------------------------------------------------- +# sysrqshutdown.sh +# - Script for SYSRQ shutdown +################################################################################ + +# check if reboot or halt, else use orig shutdown +if echo "$@" | grep -qe '-r now' + then + echo "Rebooting $(hostname) (sysrq)!" + rq_opt="b" +elif echo "$@" | grep -qe '-h now' + then + echo "Shutting down $(hostname) (sysrq)!" + rq_opt="o" +else + shutdown.slxorig $@ & + exit 0 +fi + +echo s >/proc/sysrq-trigger +sleep 1 +echo u >/proc/sysrq-trigger +(sleep 3 >/dev/null; echo ${rq_opt} >/proc/sysrq-trigger) & +killall sshd >/dev/null 2>&1 + +exit 0 + diff --git a/src/os-plugins/plugins/vmgrid/OpenSLX/OSPlugin/vmgrid.pm b/src/os-plugins/plugins/vmgrid/OpenSLX/OSPlugin/vmgrid.pm index 0965b482..0100d553 100644 --- a/src/os-plugins/plugins/vmgrid/OpenSLX/OSPlugin/vmgrid.pm +++ b/src/os-plugins/plugins/vmgrid/OpenSLX/OSPlugin/vmgrid.pm @@ -131,7 +131,7 @@ sub getAttrInfo comma separated list. first will be started first, second second, and so on, max. 4 VMs End-of-Here - content_descr => 'name of xml file e.g. scilin-5.4-wn(.xml)', + content_descr => 'name of xml file e.g. rhel-5-wn(.xml)', default => undef, }, 'vmgrid::vt' => { |