Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: etcupdate questions

On Fri, 07 Mar 2008, Jeremy C. Reed wrote:
> 1) If DOES_EXIST=false (missing) shouldn't it just install the new file 
> (since there is nothing to overwrite)?
> If not, maybe add a switch for that like:
>   -n    Automatically install new files that do not exist locally.

A switch would be fine, but unconditional installation would not.
People often have reasons for removing files that would be part of a
fresh installation.  (For example, I don't keep named in the default
place, and anways tell etcupdate not to install a new named.conf.)

> 2) Any reason to check the /etc/mtree/set.* specifications manually? Are 
> these files ever customized? It just seems like a lot to manually review 
> so I wonder if these should just be replaced?

If you don't want to review them, just press "i" at the prompt.

> 3) What about automatically replacing files where only the CVS ident 
> changes? I had many, but for one example, the only change is:
> -#      $NetBSD:,v 2007/06/16 16:56:55 snj Exp $
> +#      $NetBSD:,v 1.15 2007/05/19 17:49:39 heas Exp $

That sounds sensible.

> 4) Some output is too short to be paged but scrolls past when etcupdate 
> menu is displayed. Any option for "more" to not exit (like less) if output 
> is more than 10 lines?  (Yes, I know I could choose "less" or use my 
> console to scroll back in console history.)

It uses your $PAGER.  Configure that to your liking.

Perhaps we could use a different default if $PAGER is not set in the
environment.  more is documented to be the same as "less -E -m -G -f",
so perhaps "less -m -G -f" (without the -E flag) would be acceptable?

> 5) Maybe "s" menu choice should say: (same as "su") or repeat that it is 
> diff -u also.  Or just get rid of the "su" option as it is redundant (and 
> mention diff -u above).

No, "s" is not the same as "su".  Your preferred diff command is
remembered from one file to the next.  "su" sets the diff command to
"diff -u", and "s" uses the remembered diff command.

It might be good to print the value of $DIFF_COMMAND (or an abbreviation
of it) in the "s" description line, but that causes line length issues.
I'd suggest just updating the man page with a good description of how
the diff commands work.

> 6) Maybe add a verbose to the install_checksum() function? Maybe:
> verbose "Saving MD5 checksum for ${1} to /var/etcupdate/${1}"

Good idea.

--apb (Alan Barrett)

Home | Main Index | Thread Index | Old Index