Hi Lonnie,

thanks for your detailled response; I'll use the developer mailing list in 
future.

Regarding the settings: I managed to overwrite the TIMEZONE settings in 
"/mnt/kd/rc.conf.d/gui.network.conf" from my custom tab using a self made 
parsing routine. This way I overwrite only the timezone setting, which is still 
available in the network tab and on both tabs I see always the correct value.

Rebooting does the job: timezone is applied correctly.

Thank you so far; I'm very satisfied with the result.

Best regards

Stefan Ulm
Technical Department | Research & Development
stefan....@divus.eu

      
      


DIVUS Headquarters Pillhof 51 . I-39057 Eppan (Südtirol) . Tel. +39 0471 633 
662 . Fax. +39 0471 631 829
www.divus.eu . Privacy: http://www.divus.eu/media/DivusPrivacy.pdf


-----Ursprüngliche Nachricht-----
Von: Lonnie Abelbeck [mailto:li...@lonnie.abelbeck.com] 
Gesendet: Mittwoch, 14. September 2016 14:40
An: AstLinux Users Mailing List <astlinux-users@lists.sourceforge.net>
Betreff: Re: [Astlinux-users] Save timezone

Stefan,

For the case of TIMEZONE that is only set at system startup, look in"/etc/rc" 
to see how.  It would be safest to do a system reboot ( look for 
systemREBOOT($myself, 10); in the code ) to make sure all time related daemons 
got the change.

To restart a service use the restartPROCESS( ... ) function, again look at the 
code on how it is used.  While the ntpd daemon is 'ntpd' that only uses the 
TIMEZONE variable, not set it.

As far as custom tabs overriding existing tabs settings, the key is to save the 
TIMEZONE variable to a file alphabetically *after* where is it normally saved.  
The Network tab is "/mnt/kd/rc.conf.d/gui.network.conf" so you might use 
"/mnt/kd/rc.conf.d/user.timezone.conf" for example.

BTW, this kind of discussion is best over on the [Astlinux-devel] list.

Lonnie


On Sep 14, 2016, at 2:07 AM, Stefan Ulm <s....@divus.biz> wrote:

> Hi Lonnie,
> 
> I try to implement same setting as on network tab on a custom tab for logging 
> settings. Since the time is very important for logging interpretation I want 
> to place also date and time settings on same page to make the configuration 
> easier.
> 
> So if I understand right, it is enough to replace the entry " TIMEZONE" with 
> the new value, then to stop the corresponding service, execute "gen-rc-conf" 
> and then to restart the service.
> 
> Can you tell me which service I have to restart to apply changes of 
> date/time/timezone?
> 
> Best regards
> 
> Stefan Ulm
> Technical Department | Research & Development stefan....@divus.eu
> 
> 
> 
> 
> 
> DIVUS Headquarters Pillhof 51 . I-39057 Eppan (Südtirol) . Tel. +39 
> 0471 633 662 . Fax. +39 0471 631 829 www.divus.eu . Privacy: 
> http://www.divus.eu/media/DivusPrivacy.pdf
> 
> -----Ursprüngliche Nachricht-----
> Von: Lonnie Abelbeck [mailto:li...@lonnie.abelbeck.com]
> Gesendet: Dienstag, 13. September 2016 18:49
> An: AstLinux Users Mailing List <astlinux-users@lists.sourceforge.net>
> Betreff: Re: [Astlinux-users] Save timezone
> 
> Stefan,
> 
> The configs are all stored in /mnt/kd/rc.conf.d/*.conf
> 
> The command (script) "gen-rc-conf" combines all the configs into a single 
> /etc/rc.conf file which is referenced by the system.
> 
> So, only one place in /mnt/kd/rc.conf.d/*.conf is the source config.  It is 
> "applied" via "gen-rc-conf".
> 
> Can you explain what "implement timezone saving" you are adding ?  Is the 
> network tab "Timezone " not complete enough ?
> 
> Unrelated, just for your reference, when a service "foo" config is changed 
> and saved via the web interface, it is restarted by:
> --
> service foo stop
> gen-rc-conf
> service foo init
> --
> 
> 
> Lonnie
> 
> 
> 
> On Sep 13, 2016, at 11:15 AM, Stefan Ulm <s....@divus.biz> wrote:
> 
>> Hello all,
>> 
>> I want to implement timezone saving in a custom tab on astlinux. I could 
>> figure out how to do it and it works quite fine, except one doubt:
>> From the network tab I can see, that the timezone settings can be saved in 
>> two configuration files:
>> * /etc/rc.conf
>> * /mnt/kd/rc.conf.d/gui.network.conf
>> 
>> Do I have to save the changed timezone in both files? If not which one is 
>> the right one?
>> 
>> 
>> 
>> 
>> 
>> 
>> Best regards
>> 
>> Stefan Ulm
>> Technical Department | Research & Development stefan....@divus.eu
>> 
>> 
>> 
>> 
>> <image001.png>
>> 
>> DIVUS Headquarters Pillhof 51 . I-39057 Eppan (Südtirol) . Tel. +39
>> 0471 633 662 . Fax. +39 0471 631 829 www.divus.eu . Privacy: 
>> http://www.divus.eu/media/DivusPrivacy.pdf
>> 
>> ---------------------------------------------------------------------
>> -
>> -------- _______________________________________________
>> Astlinux-users mailing list
>> Astlinux-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/astlinux-users
>> 
>> Donations to support AstLinux are graciously accepted via PayPal to 
>> pay...@krisk.org.
> 
> 
> ----------------------------------------------------------------------
> -------- _______________________________________________
> Astlinux-users mailing list
> Astlinux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/astlinux-users
> 
> Donations to support AstLinux are graciously accepted via PayPal to 
> pay...@krisk.org.
> 
> ----------------------------------------------------------------------
> -------- _______________________________________________
> Astlinux-users mailing list
> Astlinux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/astlinux-users
> 
> Donations to support AstLinux are graciously accepted via PayPal to 
> pay...@krisk.org.
> 
> 


------------------------------------------------------------------------------
_______________________________________________
Astlinux-users mailing list
Astlinux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to 
pay...@krisk.org.

------------------------------------------------------------------------------
_______________________________________________
Astlinux-users mailing list
Astlinux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to 
pay...@krisk.org.

Reply via email to