From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:6f8:1178:2:5054:ff:fec0:8e10] ident=Debian-exim) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1WUzW7-0004y4-Sy for ptxdist@pengutronix.de; Tue, 01 Apr 2014 16:18:19 +0200 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1WUzW7-0002xb-Rn for ptxdist@pengutronix.de; Tue, 01 Apr 2014 16:18:19 +0200 Date: Tue, 1 Apr 2014 16:18:19 +0200 From: Michael Olbrich Message-ID: <20140401141819.GE31118@pengutronix.de> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Subject: Re: [ptxdist] machine-id Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de On Mon, Mar 31, 2014 at 01:13:28PM +0000, Gieseler, Christian wrote: > while thinking how to preserve the existing machine-id after an complete > update I had I look how this is generated. In the rc-once.d folder there is a > script generating an id and systemd also has the capability to generate one > and obviously does check for a valid machine-id and regenerates one in case > of an invalid/non exisiting one. > Looking into the dependencys the ptxdist machine-id script is selectd with > systemd. Is the existance of the ptxdist machine-id necessary if systemd > takes care of the machine id? > And finaly coming back to the original question what is the best way to > preserve the machine-id? Patching Systemd to change the hardcoded path? Or > are there other smarter solutions? The machine-id is read very early, so even if you change the path in systemd, so the path must be in the rootfs and is probably overwritten during a complete update. You could explicitly save the machine-id before an update and copy it back afterwards. If you have an initrd then you could bind mount your machine-id to /etc/machine-id before starting systemd. Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de