From 3eb541251dedf796307d33b195f2510d506626a7 Mon Sep 17 00:00:00 2001 From: Sebastian Schmelzer Date: Fri, 22 May 2009 17:27:30 +0000 Subject: add apache config; minor path changes git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2865 95ad53e4-c205-0410-b2fa-d234c58c8868 --- boot-env/preboot/http-server/user_settings.pl | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'boot-env/preboot/http-server/user_settings.pl') diff --git a/boot-env/preboot/http-server/user_settings.pl b/boot-env/preboot/http-server/user_settings.pl index 4f57d8b8..3469dce0 100755 --- a/boot-env/preboot/http-server/user_settings.pl +++ b/boot-env/preboot/http-server/user_settings.pl @@ -19,6 +19,15 @@ use CGI; use CGI::Carp qw(fatalsToBrowser); use File::Path; +# add openslx stuff to @INC +use FindBin; +use lib "$FindBin::RealBin/../../../../lib"; +use lib "$FindBin::RealBin"; + +# read default config +use OpenSLX::Basics; +openslxInit(); + # die "*** Taint mode must be active! ***" unless ${^TAINT}; my $cgi = CGI->new; @@ -30,8 +39,9 @@ my $prebootID = $cgi->param('preboot_id') || ''; die "must give 'system' ($system), 'client' ($client) and 'preboot_id' ($prebootID)!\n" unless $system && $client && $prebootID; -my $src = "/srv/openslx/preboot/client-config/$system/default.tgz"; -my $destPath = "/srv/www/openslx/preboot/$prebootID/client-config/$system"; +my $webPath = "$openslxConfig{'public-path'}/preboot"; +my $src = "$webPath/client-config/$system/$prebootID.tgz"; +my $destPath = "$webPath/$prebootID/client-config/$system"; mkpath($destPath); system(qq{cp $src $destPath/$client.tgz}); -- cgit v1.2.3-55-g7522