Bug 7055 - Making backup copies of files in /opt/thinlinc/etc/conf.d/ leads to unexpected results
Summary: Making backup copies of files in /opt/thinlinc/etc/conf.d/ leads to unexpecte...
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Misc (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: LowPrio
Assignee: Peter Åstrand
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-26 14:11 CEST by Peter Åstrand
Modified: 2022-01-25 12:50 CET (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Peter Åstrand cendio 2017-09-26 14:11:53 CEST
If you make a backup of a configuration file in /opt/thinlinc/etc/conf.d/ ("cp vsmagent.hconf backup.vsmagent.hconf"), the result is likely not what the administrator expected: The files are read in lexical order (sorted), so the backup file will have priority. 


It's not obvious how to fix this. The general idea in Hiveconf is that it should stop reading as soon as it has found the requested parameter. This is in the very short FAQ:

>Hiveconf FAQ
>============
>
>Q1: What happens if the same parameter is defined in several places?
>
>A1: The first occurence will be used. 

This means that it's not that easy to just check if a parameter is defined in several places. 

Perhaps there are other solutions though. For example, perhaps tl-config could:

* Retrieve the parameter, with it's config file
* Try to retrieve the parameter again, with the first config file blacklisted.

See also the hivetool --purge option, which is somewhat similar.
Comment 1 Pierre Ossman cendio 2017-10-03 13:01:49 CEST
Related to this is the possible expectation that vsmagent.hconf is the file used by the vsmagent service and not some other file.

Note You need to log in before you can comment on or make changes to this bug.