Richard W.M. Jones
2016-Mar-29 15:50 UTC
Re: [Libguestfs] [PATCH] appliance: Copy /etc/machine-id from host system into the appliance.
On Tue, Mar 29, 2016 at 03:14:15PM +0200, Pino Toscano wrote:> +# Create a machine-id with a random UUID > +dd if=/dev/urandom bs=1 count=16 status=none | od -x -A n | sed -e 's, ,,g' > /etc/machine-idOut of interest, why read single bytes, and not the whole 16 bytes in one go? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
Pino Toscano
2016-Mar-29 16:10 UTC
Re: [Libguestfs] [PATCH] appliance: Copy /etc/machine-id from host system into the appliance.
On Tuesday 29 March 2016 16:50:01 Richard W.M. Jones wrote:> On Tue, Mar 29, 2016 at 03:14:15PM +0200, Pino Toscano wrote: > > +# Create a machine-id with a random UUID > > +dd if=/dev/urandom bs=1 count=16 status=none | od -x -A n | sed -e 's, ,,g' > /etc/machine-id > > Out of interest, why read single bytes, and not the whole 16 bytes in > one go?Just habit :) (It works the same with bs=16 count=1 of course -- did the change locally.) -- Pino Toscano
Richard W.M. Jones
2016-Mar-29 17:43 UTC
Re: [Libguestfs] [PATCH] appliance: Copy /etc/machine-id from host system into the appliance.
On Tue, Mar 29, 2016 at 06:10:17PM +0200, Pino Toscano wrote:> On Tuesday 29 March 2016 16:50:01 Richard W.M. Jones wrote: > > On Tue, Mar 29, 2016 at 03:14:15PM +0200, Pino Toscano wrote: > > > +# Create a machine-id with a random UUID > > > +dd if=/dev/urandom bs=1 count=16 status=none | od -x -A n | sed -e 's, ,,g' > /etc/machine-id > > > > Out of interest, why read single bytes, and not the whole 16 bytes in > > one go? > > Just habit :) > > (It works the same with bs=16 count=1 of course -- did the change > locally.)OK, ACK with that change. Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
Possibly Parallel Threads
- Re: [PATCH] appliance: Copy /etc/machine-id from host system into the appliance.
- Re: [PATCH] appliance: Copy /etc/machine-id from host system into the appliance.
- [PATCH] appliance: Copy /etc/machine-id from host system into the appliance.
- Re: [PATCH] appliance: Copy /etc/machine-id from host system into the appliance.
- Re: [PATCH] appliance: Copy /etc/machine-id from host system into the appliance.