mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 17:31:20 +02:00
Hostname, #271. rcS needs hostname -F /etc/hostname before ifup
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@487 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -1874,18 +1874,23 @@ void CNeutrinoApp::InitNetworkSettings(CMenuWidget &networkSettings)
|
||||
|
||||
CSectionsdConfigNotifier* sectionsdConfigNotifier = new CSectionsdConfigNotifier;
|
||||
CStringInputSMS * networkSettings_NtpServer = new CStringInputSMS(LOCALE_NETWORKMENU_NTPSERVER, &g_settings.network_ntpserver, 30, LOCALE_NETWORKMENU_NTPSERVER_HINT1, LOCALE_NETWORKMENU_NTPSERVER_HINT2, "abcdefghijklmnopqrstuvwxyz0123456789-. ", sectionsdConfigNotifier);
|
||||
|
||||
CStringInput * networkSettings_NtpRefresh = new CStringInput(LOCALE_NETWORKMENU_NTPREFRESH, &g_settings.network_ntprefresh, 3,LOCALE_NETWORKMENU_NTPREFRESH_HINT1, LOCALE_NETWORKMENU_NTPREFRESH_HINT2 , "0123456789 ", sectionsdConfigNotifier);
|
||||
|
||||
CStringInputSMS * networkSettings_Hostname = new CStringInputSMS(LOCALE_NETWORKMENU_HOSTNAME, &networkConfig.hostname, 30, LOCALE_NETWORKMENU_NTPSERVER_HINT1, LOCALE_NETWORKMENU_NTPSERVER_HINT2, "abcdefghijklmnopqrstuvwxyz0123456789-. ");
|
||||
|
||||
CMenuForwarder *m0 = new CMenuForwarder(LOCALE_NETWORKMENU_SETUPNOW, true, NULL, this, "network", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED);
|
||||
CMenuForwarder *m1 = new CMenuForwarder(LOCALE_NETWORKMENU_IPADDRESS , networkConfig.inet_static, networkConfig.address , networkSettings_NetworkIP );
|
||||
CMenuForwarder *m2 = new CMenuForwarder(LOCALE_NETWORKMENU_NETMASK , networkConfig.inet_static, networkConfig.netmask , networkSettings_NetMask );
|
||||
CMenuForwarder *m3 = new CMenuForwarder(LOCALE_NETWORKMENU_BROADCAST , networkConfig.inet_static, networkConfig.broadcast , networkSettings_Broadcast );
|
||||
CMenuForwarder *m4 = new CMenuForwarder(LOCALE_NETWORKMENU_GATEWAY , networkConfig.inet_static, networkConfig.gateway , networkSettings_Gateway );
|
||||
CMenuForwarder *m5 = new CMenuForwarder(LOCALE_NETWORKMENU_NAMESERVER, networkConfig.inet_static, networkConfig.nameserver, networkSettings_NameServer);
|
||||
CMenuForwarder *m6 = new CMenuForwarder( LOCALE_NETWORKMENU_NTPSERVER, true , g_settings.network_ntpserver, networkSettings_NtpServer );
|
||||
CMenuForwarder *m7 = new CMenuForwarder( LOCALE_NETWORKMENU_NTPREFRESH, true , g_settings.network_ntprefresh, networkSettings_NtpRefresh );
|
||||
CMenuForwarder *m6 = new CMenuForwarder(LOCALE_NETWORKMENU_NTPSERVER, true , g_settings.network_ntpserver, networkSettings_NtpServer );
|
||||
CMenuForwarder *m7 = new CMenuForwarder(LOCALE_NETWORKMENU_NTPREFRESH, true , g_settings.network_ntprefresh, networkSettings_NtpRefresh );
|
||||
|
||||
CDHCPNotifier* dhcpNotifier = new CDHCPNotifier(m1,m2,m3,m4,m5);
|
||||
CMenuForwarder *m8 = new CMenuForwarder(LOCALE_NETWORKMENU_HOSTNAME, !networkConfig.inet_static, networkConfig.hostname, networkSettings_Hostname);
|
||||
|
||||
CDHCPNotifier* dhcpNotifier = new CDHCPNotifier(m1,m2,m3,m4,m5, m8);
|
||||
|
||||
network_automatic_start = networkConfig.automatic_start ? 1 : 0;
|
||||
CMenuOptionChooser* oj = new CMenuOptionChooser(LOCALE_NETWORKMENU_SETUPONSTARTUP, &network_automatic_start, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
|
||||
@@ -1903,6 +1908,7 @@ void CNeutrinoApp::InitNetworkSettings(CMenuWidget &networkSettings)
|
||||
network_dhcp = networkConfig.inet_static ? 0 : 1;
|
||||
oj = new CMenuOptionChooser(LOCALE_NETWORKMENU_DHCP, &network_dhcp, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, dhcpNotifier);
|
||||
networkSettings.addItem(oj);
|
||||
networkSettings.addItem(m8);
|
||||
networkSettings.addItem(GenericMenuSeparatorLine);
|
||||
|
||||
networkSettings.addItem( m1);
|
||||
|
Reference in New Issue
Block a user