From 646c12d4e35593ac1d515066cda7f1833f368722 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 31 Jan 2013 18:35:03 +0000 Subject: [PATCH] Rewrites to use config entry 'hostname_file' to allow e.g. Gentoo's way /etc/conf.d/hostname --- inc/classes/main/console/class_ConsoleTools.php | 2 +- inc/config.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/classes/main/console/class_ConsoleTools.php b/inc/classes/main/console/class_ConsoleTools.php index 960aaa42..0dd5b93c 100644 --- a/inc/classes/main/console/class_ConsoleTools.php +++ b/inc/classes/main/console/class_ConsoleTools.php @@ -161,7 +161,7 @@ class ConsoleTools extends BaseFrameworkSystem { try { // Get a file pointer - $io = FrameworkFileInputPointer::createFrameworkFileInputPointer('/etc/hostname'); + $io = FrameworkFileInputPointer::createFrameworkFileInputPointer($helperInstance->getConfigEntry('hostname_file')); // Read the file $hostname = trim($io->readFromFile()); diff --git a/inc/config.php b/inc/config.php index a81ea62e..21c02701 100644 --- a/inc/config.php +++ b/inc/config.php @@ -347,5 +347,8 @@ $cfg->setConfigEntry('proxy_password', ''); // CFG: PROXY-CONNECT-METHOD $cfg->setConfigEntry('proxy_connect_method', 'Y'); +// CFG: HOSTNAME-FILE +$cfg->setConfigEntry('hostname_file', '/etc/hostname'); + // [EOF] ?> -- 2.39.5