BTS

Issue713

Title config_myconfig unpacks the config file a second time
Priority wish Status resolved
Superseder Nosy List mru, zugschlus
Assigned To mru Topics

Created on 2009-07-28.17:36:47 by zugschlus, last changed 2009-12-13.07:49:19 by zugschlus.

Messages
msg2371 (view) Author: mika Date: 2009-07-30.07:52:56
* Ulrich Dangel <bts@bts.grml.org> [20090729 18:51]:

> config_unpack didn't changed the semantics it was just introduced to remove
> duplicate code. 
> But i think the current behavior is a "feature" as you could specify
> config=a.tbz myconfig=/dev/sda1 and it would unpack a.tbz from /dev/sda1. 
> Otherwise, if there is a config file on the live-image _and_ on the specified
> disk, the config file would be unpacked twice but this could be also used as a
> feature.
> For example: the config file on the live-image is for general purpose (root 
> password, authorized keys) and the config file on the block device contains only
> the ssh host key for the specific machine.

> I think it is not worth to change the code as issue 715 and the patches look
> promising.

Thanks && ACK :)

Marc, please feel free to close this issue if it's fixed for you.

regards,
-mika-
msg2370 (view) Author: mru Date: 2009-07-29.16:51:14
config_unpack didn't changed the semantics it was just introduced to remove
duplicate code. 
But i think the current behavior is a "feature" as you could specify
config=a.tbz myconfig=/dev/sda1 and it would unpack a.tbz from /dev/sda1. 
Otherwise, if there is a config file on the live-image _and_ on the specified
disk, the config file would be unpacked twice but this could be also used as a
feature.
For example: the config file on the live-image is for general purpose (root 
password, authorized keys) and the config file on the block device contains only
the ssh host key for the specific machine.

I think it is not worth to change the code as issue 715 and the patches look
promising.
msg2367 (view) Author: mika Date: 2009-07-28.21:32:28
Ulrich, you wrote config_unpack(). If you have the time and could take a look 
at that this would be awesome. If so please feel free to assign this issue to 
yourself, if you don't have neither time nor don't want to take a look at it 
please let me know. Thanks.

thx && regards,
-mika-
msg2364 (view) Author: zugschlus Date: 2009-07-28.17:36:47
Hi,

in /etc/grml/autoconfig.functions, the config_myconfig function looks what's in 
the boot param config and unpacks the found file. It then proceeds to call 
config_unpack $MOUNTDEVICE, which in turn looks for a config.tbz file again and 
unpacks it again.

I apologize, but I do not understand this part of the code. Is this the 
intended behavior, or is the code in config_myconfig just left over from an 
earlier redesign?

Greetings
Marc
History
Date User Action Args
2009-12-13 07:49:19zugschlussetstatus: wont-fix -> resolved
nosy: mru, zugschlus
2009-07-30 07:52:59mikasetnosy: mru, zugschlus
messages: + msg2371
2009-07-29 16:51:16mrusetstatus: chatting -> wont-fix
assignedto: mru
messages: + msg2370
nosy: mru, zugschlus
2009-07-28 21:32:29mikasetstatus: unread -> chatting
nosy: + mru
messages: + msg2367
2009-07-28 17:36:47zugschluscreate