Re: sysupgrade: no new snapshot -> no error

2019-05-04 Thread Jasper Lievisse Adriaanse



> On 3 May 2019, at 17:04, Christian Weisgerber  wrote:
> 
> It is not an error condition if no new snapshot is available.
> (Is it?)
> 
> Index: sysupgrade.sh
> ===
> RCS file: /cvs/src/usr.sbin/sysupgrade/sysupgrade.sh,v
> retrieving revision 1.9
> diff -u -p -r1.9 sysupgrade.sh
> --- sysupgrade.sh 3 May 2019 13:04:40 -   1.9
> +++ sysupgrade.sh 3 May 2019 14:15:41 -
> @@ -115,7 +115,8 @@ cd ${SETSDIR}
> unpriv -f SHA256.sig ftp -Vmo SHA256.sig ${URL}SHA256.sig
> 
> if cmp -s /var/db/installed.SHA256.sig SHA256.sig && ! $FORCE; then
> - ug_err "Already on latest snapshot."
> + echo "Already on latest snapshot."
> + exit 0
> fi
> 
> _KEY=openbsd-${_KERNV[0]%.*}${_KERNV[0]#*.}-base.pub
> -- 
> Christian "naddy" Weisgerber  na...@mips.inka.de
> 

I don’t think it should be an error condition because it effectively means 
you’re up-to-date -- which is a good thing.

Cheers,
Jasper



sysupgrade: no new snapshot -> no error

2019-05-03 Thread Christian Weisgerber
It is not an error condition if no new snapshot is available.
(Is it?)

Index: sysupgrade.sh
===
RCS file: /cvs/src/usr.sbin/sysupgrade/sysupgrade.sh,v
retrieving revision 1.9
diff -u -p -r1.9 sysupgrade.sh
--- sysupgrade.sh   3 May 2019 13:04:40 -   1.9
+++ sysupgrade.sh   3 May 2019 14:15:41 -
@@ -115,7 +115,8 @@ cd ${SETSDIR}
 unpriv -f SHA256.sig ftp -Vmo SHA256.sig ${URL}SHA256.sig
 
 if cmp -s /var/db/installed.SHA256.sig SHA256.sig && ! $FORCE; then
-   ug_err "Already on latest snapshot."
+   echo "Already on latest snapshot."
+   exit 0
 fi
 
 _KEY=openbsd-${_KERNV[0]%.*}${_KERNV[0]#*.}-base.pub
-- 
Christian "naddy" Weisgerber  na...@mips.inka.de