[Pkg-uml-pkgs] Bug#388076: [Pkg-uml-commit] r227 - in trunk/src/rootstrap: debian modules

Mattia Dongili malattia at linux.it
Wed Oct 4 10:30:35 UTC 2006


On Wed, October 4, 2006 10:38 am, Stefano Melchior said:
[...]
> -  * add amd64 architecture, build and unstable rootfs image creation
> tested.

please remove also the build-architecture from the debian/control file.

> +  * add uml IP, hostname and domain in /etc/hosts (Closes: #388076)
>    * correctly write the timezone file in the guest FS (Closes: #388055)
>    * try to print descriptive error messages when a module fails
>      (Closes: #388061)
>
> Modified: trunk/src/rootstrap/modules/network
> ===================================================================
> --- trunk/src/rootstrap/modules/network	2006-10-03 18:47:11 UTC (rev 226)
> +++ trunk/src/rootstrap/modules/network	2006-10-04 08:38:50 UTC (rev 227)
> @@ -22,16 +22,20 @@
>  echo "netmask=$netmask" >> $CONF
>  echo "gateway=$gateway" >> $CONF
>
> +echo "127.0.0.1  localhost " > /etc/hosts
> +
> +if [ -z "$hostname" ]; then
> +  hostname=rootstrap
> +fi
> +
> +hostname "$hostname"
> +
>  if test -n "$domain"; then
>      echo "domain $domain" > /etc/resolv.conf
> +    echo "$uml $hostname.$domain $hostname" >> /etc/hosts
>  fi

I'm not very happy with this implementation (as I wasn't with the
suggestion in the bug report):
1. $uml can also have the value "dhcp" which would break /etc/hosts.
2. how does this work with a DHCP guest anyway?
3. it sucks that we are doing something that may be unwanted (eg: I
wouldn't want it), IOW make it _at_least_ configurable.

Anyway this bug would be better dealt with within a larger picture, for
example support for config file templates allowing to build multiple root
images, something I'd like to add in the near feature. Just to give an
idea I'd like to be able to tell rootstrap to create images for the whole
10.1.1.0/24 subnet (and even with the uml COW support).

-- 
mattia
:wq!






More information about the Pkg-uml-pkgs mailing list