summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Janczyk2012-12-12 18:59:34 +0100
committerMichael Janczyk2012-12-12 18:59:34 +0100
commitc0feaa89cc0f28a149db7a02cd573b3815a33625 (patch)
treed25a100ec6d1d0f6cf53829c6745eed328e780b1 /src
parentchanged path to meet standard (diff)
downloadcore-c0feaa89cc0f28a149db7a02cd573b3815a33625.tar.gz
core-c0feaa89cc0f28a149db7a02cd573b3815a33625.tar.xz
core-c0feaa89cc0f28a149db7a02cd573b3815a33625.zip
minor sysrq changes, nohup is needed to log out from ssh session before halt or reboot
Diffstat (limited to 'src')
-rw-r--r--src/os-plugins/plugins/sysrqshutdown/OpenSLX/OSPlugin/sysrqshutdown.pm19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/os-plugins/plugins/sysrqshutdown/OpenSLX/OSPlugin/sysrqshutdown.pm b/src/os-plugins/plugins/sysrqshutdown/OpenSLX/OSPlugin/sysrqshutdown.pm
index c30ec5dc..07630fcb 100644
--- a/src/os-plugins/plugins/sysrqshutdown/OpenSLX/OSPlugin/sysrqshutdown.pm
+++ b/src/os-plugins/plugins/sysrqshutdown/OpenSLX/OSPlugin/sysrqshutdown.pm
@@ -70,23 +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 $pluginBasePath/sysrqshutdown.sh \
- /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;
}