X-Git-Url: http://git.onelab.eu/?p=www-register-wizard.git;a=blobdiff_plain;f=application%2Fcontrollers%2Fdownload.php;fp=application%2Fcontrollers%2Fdownload.php;h=843d29f1d0805c436c94c0ff7b059f8e9cb46f9b;hp=5b710810e3594a8bb679158dd139baf077d84fff;hb=57f416508ed554a5715807f75c7fd4f2ee2d9eee;hpb=b62910bcf599bf6a373d55c6584d84f4d1f7c20d diff --git a/application/controllers/download.php b/application/controllers/download.php index 5b71081..843d29f 100644 --- a/application/controllers/download.php +++ b/application/controllers/download.php @@ -11,6 +11,7 @@ include 'plc_header.php'; // Common functions require_once 'plc_functions.php'; +require_once 'plc_config.php'; include 'plc_objects.php'; @@ -250,7 +251,16 @@ class Download extends Controller { } function get_bootcd_version() { - $BOOTCD="/usr/share/bootcd"; + // pick default bootcd flavors. need more flexibility + // TODO: find a way to handle 32/64 bit. + if ( defined("PLC_FLAVOUR_NODE_PLDISTRO") ) + { + // This approach only works for 5.0 + $BOOTCD = "/usr/share/bootcd-" . PLC_FLAVOUR_NODE_PLDISTRO . "-" . PLC_FLAVOUR_NODE_FCDISTRO . "-" . PLC_FLAVOUR_NODE_ARCH; + } else { + $BOOTCD = exec ("ls -d /usr/share/bootcd*"); + } + $BOOTCDVERSION="$BOOTCD/build/version.txt"; $version = trim(file_get_contents($BOOTCDVERSION)); $bootcd_version = PLC_NAME . "-BootCD-".$version;