# etcupdate not proceeding as should



## jb_fvwm2 (Jul 8, 2021)

checking the header of /etc/shells and /usr/etc/shells, it appears
a version 13-STABLE to 13-STABLE buildworld using `etcupdate -p`and
`etcupdate -B` did not update the header line, meaning if I were to run
`mergemaster` instead more updates post-installworld might be done.
.................................................
I also ran it using a tarfile from another system where`etcupdate` did work
as expected, but no significant changes occured that I could see.
.................................................
The system is still whole, but I'd like to
1...  revert to `etcupdate` working without the message that
' no previous tree to compare against' that recurs
2...  maybe lessen a few spurious warnings in dmesg that I've not been
able to track the source of. 
3... have `etcupdate` working before the next STABLE update from source
 4... learn if `etcupdate resolve` fixes the issue, but with a description from
  someone who has used it so I'd know what to expect.


----------



## Alain De Vos (Jul 8, 2021)

Did you run in this order :
1. etcupdate -p
2. make installworld
3. etcupdate -B

Its a good idea to always make a manual backup of /etc before running etcupdate or mergemaster...


----------



## SirDice (Jul 8, 2021)

jb_fvwm2 said:


> checking the header of /etc/shells and /usr/etc/shells, it appears
> a version 13-STABLE to 13-STABLE buildworld using `etcupdate -p`and
> `etcupdate -B` did not update the header line, meaning if I were to run
> `mergemaster` instead more updates post-installworld might be done.


Header lines have lost their function since the migration to git. That's why it's recommended not to use mergemaster(8) anymore.

All header lines look like this now:

```
# $FreeBSD$
```
When previously (when the code was still on cvs and svn) it looked like this:

```
# $FreeBSD: releng/12.2/lib/libc/gen/shells 336840 2018-07-28 20:21:23Z brd $
```
Those header lines were a function of the version control software. The 12 branches are still maintained in subversion until their EoL, for 13 and onward however it's only available on git. Thus no more header lines to rely on.


----------



## jb_fvwm2 (Jul 8, 2021)

Alain De Vos said:


> Did you run in this order :
> 1. etcupdate -p
> 2. make installworld
> 3. etcupdate -B
> ...


I believe so. That's why it concerns me that no action was taken with
the 'no previous tree' message instead.


----------



## Alain De Vos (Jul 8, 2021)

Note, if there is nothing to do there is nothing to do. Did something stopped functioning correctly ?


----------



## jb_fvwm2 (Jul 8, 2021)

I just ran `etcupdate -B` again. 
/etc/shells lists 12 items, and header:

```
$FreeBSD: head/etc/shells 59717 2000-04-27 21:58:46Z ache $
```
which is obviously not the /usr/src/etc/shells header.
which is the new format, and which only contains 3 shells.
{I've another older shells with 14,  a few expired ports. } 
I'm concerned that I could fix it one more time with `mergemaster` post `installworld,` but
1... should I ?
2... would it fix `etcupdate` completing without any action in
 the future? 
Just posting for advice going forward. 
[ the stated file is one of MANY that `mergemaster` would
act upon... `etcupdate diff` shows over 20 files still
not updated.


----------



## Alain De Vos (Jul 8, 2021)

Here is what i did, it is not an advice, it worked nicely in my case.
I backed up /etc directory
etcupdate creates a current tree in /var
I blindly! copied over this current tree over the existing /etc directory.
I manually fixed all problems including the overwrite of the password file, because i had the backup of the /etc directory.

Note, etcupdate became "more intelligent". If it has nothing to do it does nothing.
And start thinking all the lines starting with # are not existing.


----------

