summaryrefslogtreecommitdiffstats
path: root/boot-env
diff options
context:
space:
mode:
authorSebastian Schmelzer2009-05-22 19:27:30 +0200
committerSebastian Schmelzer2009-05-22 19:27:30 +0200
commit3eb541251dedf796307d33b195f2510d506626a7 (patch)
treeee229e4c066aba6424f72f3496f0991a9d42a40c /boot-env
parentuse dialog menus instead of radioboxes (diff)
downloadcore-3eb541251dedf796307d33b195f2510d506626a7.tar.gz
core-3eb541251dedf796307d33b195f2510d506626a7.tar.xz
core-3eb541251dedf796307d33b195f2510d506626a7.zip
add apache config; minor path changes
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2865 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'boot-env')
-rw-r--r--boot-env/preboot/conf/apache-openslx-preboot.conf16
-rwxr-xr-xboot-env/preboot/http-server/user_settings.pl14
-rwxr-xr-xboot-env/preboot/preboot.sh6
3 files changed, 31 insertions, 5 deletions
diff --git a/boot-env/preboot/conf/apache-openslx-preboot.conf b/boot-env/preboot/conf/apache-openslx-preboot.conf
new file mode 100644
index 00000000..ed7c5082
--- /dev/null
+++ b/boot-env/preboot/conf/apache-openslx-preboot.conf
@@ -0,0 +1,16 @@
+ ScriptAlias /openslx-preboot/cgi-bin/ "/opt/openslx/share/boot-env/preboot/http-server/"
+ Alias /openslx-preboot/ "/srv/openslx/preboot/"
+
+ <Directory "/srv/openslx/preboot/">
+ Options -Indexes -ExecCGI FollowSymLinks MultiViews
+ AllowOverride None
+ Order allow,deny
+ allow from all
+ </Directory>
+
+ <Directory "/opt/openslx/share/boot-env/preboot/http-server/">
+ AllowOverride None
+ Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
+ Order allow,deny
+ Allow from all
+ </Directory> \ No newline at end of file
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});
diff --git a/boot-env/preboot/preboot.sh b/boot-env/preboot/preboot.sh
index 00e358ba..9ec9e90d 100755
--- a/boot-env/preboot/preboot.sh
+++ b/boot-env/preboot/preboot.sh
@@ -38,8 +38,8 @@ w3m -o confirm_qq=no \
chvt 1
# fetch kernel and initramfs of selected system
-wget -O /tmp/kernel $boot_uri/system/$kernel
-wget -O /tmp/initramfs $boot_uri/system/$initramfs
+wget -O /tmp/kernel $boot_uri/$kernel
+wget -O /tmp/initramfs $boot_uri/$initramfs
# read primary IP configuration to pass it on
. /tmp/ipstuff
@@ -47,5 +47,5 @@ wget -O /tmp/initramfs $boot_uri/system/$initramfs
# start the new kernel with initialramfs and composed cmdline
echo "Booting OpenSLX client $label ..."
kexec -l /tmp/kernel --initrd=/tmp/initramfs \
- --append="$append file=$boot_uri/preboot/${preboot_id}/client-config/${sysname}/${client}.tgz $quiet ip=$ip:$siaddr:$router:$subnet:$dnssrv debug=3"
+ --append="$append file=$boot_uri/${preboot_id}/client-config/${sysname}/${client}.tgz $quiet ip=$ip:$siaddr:$router:$subnet:$dnssrv debug=3"
kexec -e