diff options
author | michael pereira | 2011-07-07 14:01:45 +0200 |
---|---|---|
committer | michael pereira | 2011-07-07 14:01:45 +0200 |
commit | b2c5c02e03a8c7ca73e3c787006ad854de5f336a (patch) | |
tree | 6e953f3db08013de4eb2159826a6db49bd43a87f /application/views | |
parent | remove parse error (diff) | |
download | pbs2-b2c5c02e03a8c7ca73e3c787006ad854de5f336a.tar.gz pbs2-b2c5c02e03a8c7ca73e3c787006ad854de5f336a.tar.xz pbs2-b2c5c02e03a8c7ca73e3c787006ad854de5f336a.zip |
Bootos zeigt nun an welche Dateien vorhanden sind. iPXE im Resource controller implementiert
Diffstat (limited to 'application/views')
-rw-r--r-- | application/views/scripts/resource/getvesamenu.phtml | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/application/views/scripts/resource/getvesamenu.phtml b/application/views/scripts/resource/getvesamenu.phtml new file mode 100644 index 0000000..7751f20 --- /dev/null +++ b/application/views/scripts/resource/getvesamenu.phtml @@ -0,0 +1,142 @@ +<?php + +// $username = $_SERVER["PHP_AUTH_USER"]; +// $password = $_SERVER["PHP_AUTH_PW"]; + + $index = 0; + + function title ( $title ) { + global $username; + echo "menu title ".$title; + echo ( $username ? " for ".$username : "" )."\n"; + } + + function label ( $label ) { + global $index; + $index++; + echo "label item".$index."\n"; + echo " menu label "; + echo "^".( ( $index < 10 ) ? $index : + sprintf ( "%c", $index + ord ( 'A' ) - 10 ) )." "; + echo $label."\n"; + } + + function uriboot ( $label, $uri, $args ) { + label ( $label ); + echo " kernel ".$uri."\n"; + if ( $args ) + echo " append ".$args."\n"; + } + + function localboot () { + label ( "LOCALBOOT"); + echo "LOCALBOOT -1\n"; + texthelp("Gets you out of here by booting from next device in BIOS boot + order."); + } + + function texthelp ( $texthelp ){ + echo "TEXT HELP\n"; + echo $texthelp."\n"; + echo "ENDTEXT\n"; + } + + function retry () { + echo "label failed\n"; + echo " menu label Authentication Failed\n"; + echo " menu disable\n"; + uriboot ( "Try again", "ipxe.php", "" ); + } + + function authenticated () { + global $username; + global $password; + + switch ( "$username:$password" ) { + case "test:test": + case "guest:guest": + return 1; + default: + return 0; + } + } + + ?> + +TIMEOUT 100 +PROMPT 0 +DEFAULT vesamenu.c32 + +MENU BACKGROUND pbs2.png +MENU WIDTH 78 +MENU MARGIN 9 +MENU PASSWORDMARGIN 9 +MENU ROWS 10 +MENU TABMSGROW 16 +MENU CMDLINEROW 16 +MENU ENDROW -1 +MENU PASSWORDROW 16 +MENU TIMEOUTROW 20 +MENU HELPMSGROW 16 +MENU HELPMSGENDROW -1 +MENU HSHIFT 0 +MENU VSHIFT 7 + +#menu color screen 37;40 #80ffffff #00000000 std +menu color border 37;40 #00000000 #00000000 std +menu color title 1 #ee004a99 #00000000 all +menu color unsel 37;40 #ff4f75aa #00000000 all +menu color hotkey 1;37;40 #ffff8b00 #ff8093a1 std +menu color sel 7;37;40 #ff1c2a33 #667799bb all +#menu color hotsel 1;7;37;40 #ffff8b00 #667799bb all +#menu color disabled 1;37;40 #ffff8b00 #ff8093a1 std +#menu color scrollbar 37;40 #40000000 #ee000000 std +#menu color tabmsg 37;40 #ffff8b00 #ff8093a1 std +#menu color cmdmark 1;37;40 #ffff8b00 #ff8093a1 std +#menu color cmdline 37;40 #fff0f0f0 #ff8093a1 std +#menu color pwdborder 37;40 #40000000 #ff8093a1 std +#menu color pwdheader 37;40 #ffff8b00 #ff8093a1 std +#menu color pwdentry 37;40 #ffff8b00 #ff8093a1 std +#menu color timeout_msg 37;40 #fff0f0f0 #ff8093a1 std +#menu color timeout 1;37;40 #ffff8b00 #ff8093a1 std +#menu color help 37;40 #ff1c2a33 #00000000 none +MENU MSGCOLOR #ff1c2a33 #00000000 none + +<? + +// title ( "Welcome to OpenSLX PreBoot USB Ext2/3 (Mini Linux/Kexec)" ); +// +// if ( ! authenticated() ) { +// retry(); +// } else { +// +// if ( $username == "test" ) { +// +// localboot(); +// } + +uriboot ( "Ubuntu 10.04", + "http://$this->host/resource/getkernel/", "initrd=init vga=0x317" ); + +localboot(); +// } + +// LABEL SLXSTDBOOT +// MENU LABEL +// KERNEL kernel +// APPEND initrd=init vga=0x317 +// TEXT HELP +// Use this (default) entry if you have configured your client. +// You have chance to edit the kernel commandline by hitting the +// TAB key (e.g. for adding debug=3 to it for bug hunting) ... +// ENDTEXT +//LABEL DEBUGBOOT +// MENU LABEL OpenSLX PreBoot - Debug Mode +// KERNEL kernel +// APPEND initrd=init vga=0x317 debug=3 +// TEXT HELP +// Use this to start the preboot environment with debug shells. +// ENDTEXT + + + ?>
\ No newline at end of file |