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/plugins/sysrqshutdown/OpenSLX/OSPlugin/sysrqshutdown.pm | |
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/plugins/sysrqshutdown/OpenSLX/OSPlugin/sysrqshutdown.pm')
-rw-r--r-- | src/os-plugins/plugins/sysrqshutdown/OpenSLX/OSPlugin/sysrqshutdown.pm | 18 |
1 files changed, 8 insertions, 10 deletions
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; } |