Re: Booted nanobsd image has /etc schg flag set

From: Michael Reifenberger <mike_at_reifenberger.com>
Date: Mon, 28 Mar 2011 08:54:44 +0200 (CEST)
Hi,

I've tracked this down:

- Because on the building host /var/empty (comes from BSD.var.dist) has schg set
   it gets copied to the cfg slice during populate_slice() in nanobsd.sh
- During boot /cfg gets copied over to /etc and the schg flag too
- After that neither /cfg nor /etc are fully functional...

I'll commit the following fix:
...
Index: nanobsd.sh
===================================================================
--- nanobsd.sh  (Revision 219862)
+++ nanobsd.sh  (Arbeitskopie)
_at__at_ -413,8 +413,8 _at__at_
         dir=$2
         mnt=$3
         lbl=$4
-       test -z $2 && dir=/var/empty
-       test -d $dir || dir=/var/empty
+       test -z $2 && dir=${NANO_WORLDDIR}/var/empty
+       test -d $dir || dir=${NANO_WORLDDIR}/var/empty
         echo "Creating ${dev} with ${dir} (mounting on ${mnt})"
         newfs_part $dev $mnt $lbl
         cd ${dir}
...

On Sat, 26 Mar 2011, Michael Reifenberger wrote:

> Date: Sat, 26 Mar 2011 18:25:40 +0100 (CET)
> From: Michael Reifenberger <mike_at_reifenberger.com>
> To: FreeBSD-Current <current_at_freebsd.org>
> Subject: Booted nanobsd image has /etc schg flag set
> 
> Hi,
> I can't find the place where the schg flag is set for /etc
> during boot.
> (Must be during boot since the FS inside the image doesn't contain a schg 
> flagged file)
> /var which is also a MFS FS hasn't schg set.
>
> This prevents the creation of new files like resolv.conf or host.conf
> after startup...
>
> Bye/2
> ---
> Michael Reifenberger
> Michael_at_Reifenberger.com
> http://www.Reifenberger.com
>
>

Bye/2
---
Michael Reifenberger
Michael_at_Reifenberger.com
http://www.Reifenberger.com
Received on Mon Mar 28 2011 - 04:54:48 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:12 UTC