@@ -64,7 +64,7 @@ public function __construct(){
6464 * @return string
6565 */
6666 public function hostname (){
67- $ dist = $ this ->server_conf [ ' dist ' ] ;
67+ $ dist = $ this ->get_os_type () ;
6868
6969 ob_start ();
7070 passthru ('hostname ' );
@@ -1228,7 +1228,7 @@ function rc_edit($service, $rl, $action){
12281228 global $ app ;
12291229 $ dist_init_scripts = $ app ->system ->server_conf ['dist_init_scripts ' ];
12301230 $ dist_runlevel = $ app ->system ->server_conf ['dist_runlevel ' ];
1231- $ dist = $ app -> system -> server_conf [ ' dist ' ] ;
1231+ $ dist = $ this -> get_os_type () ;
12321232 if (trim ($ dist_runlevel ) == '' ){ // falls es keine runlevel gibt (FreeBSD)
12331233 if ($ action == 'on ' ){
12341234 @symlink ($ dist_init_scripts .'/ ' .$ service , $ dist_init_scripts .'/ ' .$ service .'.sh ' );
@@ -1382,7 +1382,7 @@ function cat($file){
13821382 function daemon_init($daemon, $action){
13831383 //* $action = start|stop|restart|reload
13841384 global $app;
1385- $dist = $this->server_conf['dist'] ;
1385+ $dist = $this->get_os_type() ;
13861386 $dist_init_scripts = $this->server_conf['dist_init_scripts'];
13871387 if(!strstr($dist, 'freebsd')){
13881388 $app->log->caselog("$dist_init_scripts/$daemon $action &> /dev/null", $this->FILE, __LINE__);
@@ -1478,7 +1478,7 @@ function broadcast($ip, $netmask){
14781478 *
14791479 */
14801480 function network_info (){
1481- $ dist = $ this ->server_conf [ ' dist ' ] ;
1481+ $ dist = $ this ->get_os_type () ;
14821482 ob_start ();
14831483 passthru ('ifconfig ' );
14841484 $ output = ob_get_contents ();
0 commit comments