Closed PLanB2008 closed 5 years ago
Duplicate from #69.
This is not fine. These are example files and no config templates really. They will be overwritten on every package upgrade. So patching these files on setup is kinda stupid. We need another solution. Also for the start.conf examples.
Oh ! I think I did not read the whole thing ... sorry. I think we could do the following : when a linbo example file is copied through the webui, we can simply automatically replace some value ( ip, domain, what needed, etc ... ).
@HappyBasher @PLanB2008 : is this a valid solution for you ?
A proper solution is the webui takes the example files as they are and patches them with the necessary values. All needed environment variables are stored in /var/lib/linuxmuster/setup.ini. The most proper way in my opinion is the webui provides its own config templates, to avoid the circumstance that the linbo examples may contain shit or have changed in an essential way.
is this a valid solution for you ?
Yep!
This is not fine. These are example files and no config templates really. They will be overwritten on every package upgrade. So patching these files on setup is kinda stupid. We need another solution. Also for the start.conf examples.
So this is also kind of stupid, right?
https://github.com/linuxmuster/linuxmuster-linbo/commit/77cd1cb3a93d91601329913bf6d96a350c6d6ff4
Of course we can appply this ourselves. I just thought the correct way would be to provide proper examples or generate these examples by using a template.
So this is also kind of stupid, right?
Of course not! This occurs during syncing process on a reg file which is assigned to an image and therefore not under control of the debian packaging system. What I mean is that it is stupid to patch example files that are overwritten on every package upgrade. Take these files and do what you want with them but do not change themselves! Unfortunately we overlooked this fact last weekend. Stupid! Nevertheless I implemented the patching in the meantime. Much more stupid!
As I can see, the examples seem to be only used in the Webui, or maybe I missed something. The template way is really convenient, e.g. :
# LINBO start.conf, Beispiel fuer Ubuntu
# DON'T EDIT THIS FILE ! MAKE A COPY AND ADAPT THE VALUES ( %%SERVERIP%%, ... )
# Ubuntu auf Partition 1
# Cache auf Partition 2
# Swap auf Partition 3
# Daten auf Partition 4
[LINBO] # Start der globalen Konfiguration
Server = %%SERVERIP%% # IP des Linbo-Servers, der das Linbo-Repository vorhaelt, z.B. 10.0.0.1
Group = gruppe # Name der Rechnergruppe fuer die diese Konfigurationsdatei gilt
in all examples, instead of :
# LINBO start.conf, Beispiel fuer Ubuntu
# Ubuntu auf Partition 1
# Cache auf Partition 2
# Swap auf Partition 3
# Daten auf Partition 4
[LINBO] # Start der globalen Konfiguration
Server = 10.16.1.1 # IP des Linbo-Servers, der das Linbo-Repository vorhaelt
Group = gruppe # Name der Rechnergruppe fuer die diese Konfigurationsdatei gilt
With this method :
replace()
method,Is this an acceptable solution for all ?
The template way is Ok for me. Suggestion 1:
Ok, no problem with it.
Done here : https://github.com/linuxmuster/linuxmuster-webui7/commit/b7129571dc6bcb98275db50c75716f7da746e71f
@HappyBasher : there is no need to change your example files with placeholder @@ServerIP@@ or @@group@@, just let 10.0.0.1 and group in, there was a simplier way with javascript what I've unseen.
So, I think only the warning at the beginning of the file is needed.
Done in linuxmuster-linbo 2.3.49 (see https://github.com/linuxmuster/linuxmuster-linbo/issues/111).
This is related to:
https://github.com/linuxmuster/linuxmuster-webui7/issues/86
right now linuxmuster-base does patch the examples to set the DOMAIN name during the setup for the window reg examples.
I thinks something similar would be suffient here as well. Just set these values correct once during the setup and this should be fine.