From c4ac8e072b6ecedabc6b94e47a5f65a02be4d84e Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 27 Jun 2014 21:17:30 +0200 Subject: Cleanup and minor fix --- external/build_ipxe.sh | 40 ---------------------------------- external/tgz/list.php | 24 -------------------- inc/taskmanager.inc.php | 2 +- modules/sysconfig/addmodule_ad.inc.php | 2 -- 4 files changed, 1 insertion(+), 67 deletions(-) delete mode 100755 external/build_ipxe.sh delete mode 100644 external/tgz/list.php diff --git a/external/build_ipxe.sh b/external/build_ipxe.sh deleted file mode 100755 index 8cb23cd0..00000000 --- a/external/build_ipxe.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -# Call: $0 -# Self-Call: $0 --exec - -if [ $# -lt 3 ]; then - echo "Falscher Aufruf: Keine zwei Parameter angegeben!" - exit 1 -fi - -if [ "$1" != "--exec" ]; then - $0 --exec "$1" "$2" > "$3" 2>&1 & - RET=$! - echo "PID: ${RET}." - exit 0 -fi - -FILE="$2" -SERVER="$3" - -cd "/opt/openslx/ipxe/src" - -[ -e "bin/undionly.kkkpxe" ] && unlink "bin/undionly.kkkpxe" - -make bin/undionly.kkkpxe EMBED=../ipxelinux.ipxe,../pxelinux.0 - -if [ ! -e "bin/undionly.kkkpxe" -o "$(stat -c %s "bin/undionly.kkkpxe")" -lt 80000 ]; then - echo "Error compiling ipxelinux.0" - exit 1 -fi - -if ! cp "bin/undionly.kkkpxe" "/srv/openslx/tftp/ipxelinux.0"; then - echo "** Error copying ipxelinux.0 to target **" - exit 1 -fi - -echo -n "$SERVER" > "$FILE" -echo " ** SUCCESS **" -exit 0 - diff --git a/external/tgz/list.php b/external/tgz/list.php deleted file mode 100644 index 5c8d1c67..00000000 --- a/external/tgz/list.php +++ /dev/null @@ -1,24 +0,0 @@ -" }'; -} -echo ' ]'; -*/ - -$files = array(); -foreach (glob('./*.tgz') as $file) { - $files[] = array( - 'file' => basename($file), - 'description' => 'Eine sinnvolle Beschreibung' - ); -} - -echo json_encode($files); - diff --git a/inc/taskmanager.inc.php b/inc/taskmanager.inc.php index d9e890c6..5813164a 100644 --- a/inc/taskmanager.inc.php +++ b/inc/taskmanager.inc.php @@ -178,7 +178,7 @@ class Taskmanager private static function readReply($seq) { $tries = 0; - while (($bytes = socket_recvfrom(self::$sock, $buf, 90000, 0, $bla1, $bla2)) !== false) { + while (($bytes = socket_recvfrom(self::$sock, $buf, 90000, 0, $bla1, $bla2)) !== false || socket_last_error() === 11) { $parts = explode(',', $buf, 2); if (count($parts) == 2 && $parts[0] == $seq) { return json_decode($parts[1], true); diff --git a/modules/sysconfig/addmodule_ad.inc.php b/modules/sysconfig/addmodule_ad.inc.php index e016685b..60d8d88d 100644 --- a/modules/sysconfig/addmodule_ad.inc.php +++ b/modules/sysconfig/addmodule_ad.inc.php @@ -15,8 +15,6 @@ class AdModule_Start extends AddModule_Base protected function renderInternal() { - Session::set('ad_check', false); - Session::save(); Render::addDialog('Active Directory Authentifizierung', false, 'sysconfig/ad-start', array( 'step' => 'AdModule_CheckConnection', 'server' => Request::post('server'), -- cgit v1.2.3-55-g7522