syspatch exits with 1

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

syspatch exits with 1

Juan Francisco Cantero Hurtado
syspatch exits with 1 when there was not a real error.

# ksh -x /usr/sbin/syspatch
+ set -e
+ umask 0022
+ id -u
+ let 0 != 0
+ pgrep -qxf /bin/ksh .*reorder_kernel
+ sysctl -n kern.version
+ sed s/^OpenBSD \([0-9]\.[0-9]\)\([^ ]*\).*/\1 \2/;q
+ set -A _KERNV -- 6.3
+ let 1 > 1
+ _OSrev=63
+ 2> /dev/null
+ machine
+ _MIRROR=http://fastly.cdn.openbsd.org/pub/OpenBSD//syspatch/6.3/amd64
+ sysctl -n hw.ncpufound
+ let 2 > 1
+ _BSDMP=true
+ _PDIR=/var/syspatch
+ mktemp -d -p /tmp syspatch.XXXXXXXXXX
+ _TMP=/tmp/syspatch.JXvDQcTe2t
+ _KARL=false
+ readonly _BSDMP _KERNV _MIRROR _OSrev _PDIR _TMP
+ trap trap_handler EXIT
+ trap exit HUP INT TERM
+ getopts clRr arg
+ shift 0
+ let 0 != 0
+ let OPTIND == 1
+ rm -f /bsd.syspatch+([[:digit:]])
+ continue
+ continue
+ ls_missing
+ _PATCHES=
+ trap_handler
# echo $?
1

The problem was reported by Marco Di Pietro.


--
Juan Francisco Cantero Hurtado http://juanfra.info

Reply | Threaded
Open this post in threaded view
|

Re: syspatch exits with 1

Antoine Jacoutot-7
On Tue, Apr 10, 2018 at 01:16:34PM +0200, Juan Francisco Cantero Hurtado wrote:
> syspatch exits with 1 when there was not a real error.

The "error" is that there's no sig fail available yet (because there are no
syspatches).

> # ksh -x /usr/sbin/syspatch
> + set -e
> + umask 0022
> + id -u
> + let 0 != 0
> + pgrep -qxf /bin/ksh .*reorder_kernel
> + sysctl -n kern.version
> + sed s/^OpenBSD \([0-9]\.[0-9]\)\([^ ]*\).*/\1 \2/;q
> + set -A _KERNV -- 6.3
> + let 1 > 1
> + _OSrev=63
> + 2> /dev/null
> + machine
> + _MIRROR=http://fastly.cdn.openbsd.org/pub/OpenBSD//syspatch/6.3/amd64
> + sysctl -n hw.ncpufound
> + let 2 > 1
> + _BSDMP=true
> + _PDIR=/var/syspatch
> + mktemp -d -p /tmp syspatch.XXXXXXXXXX
> + _TMP=/tmp/syspatch.JXvDQcTe2t
> + _KARL=false
> + readonly _BSDMP _KERNV _MIRROR _OSrev _PDIR _TMP
> + trap trap_handler EXIT
> + trap exit HUP INT TERM
> + getopts clRr arg
> + shift 0
> + let 0 != 0
> + let OPTIND == 1
> + rm -f /bsd.syspatch+([[:digit:]])
> + continue
> + continue
> + ls_missing
> + _PATCHES=
> + trap_handler
> # echo $?
> 1
>
> The problem was reported by Marco Di Pietro.
>
>
> --
> Juan Francisco Cantero Hurtado http://juanfra.info
>

--
Antoine

Reply | Threaded
Open this post in threaded view
|

Re: syspatch exits with 1

Juan Francisco Cantero Hurtado
On Tue, Apr 10, 2018 at 01:21:01PM +0200, Antoine Jacoutot wrote:
> On Tue, Apr 10, 2018 at 01:16:34PM +0200, Juan Francisco Cantero Hurtado wrote:
> > syspatch exits with 1 when there was not a real error.
>
> The "error" is that there's no sig fail available yet (because there are no
> syspatches).

I know but it's just a little weird because the update didn't failed.
Anyway, no complaints, just reporting.


> > # ksh -x /usr/sbin/syspatch
> > + set -e
> > + umask 0022
> > + id -u
> > + let 0 != 0
> > + pgrep -qxf /bin/ksh .*reorder_kernel
> > + sysctl -n kern.version
> > + sed s/^OpenBSD \([0-9]\.[0-9]\)\([^ ]*\).*/\1 \2/;q
> > + set -A _KERNV -- 6.3
> > + let 1 > 1
> > + _OSrev=63
> > + 2> /dev/null
> > + machine
> > + _MIRROR=http://fastly.cdn.openbsd.org/pub/OpenBSD//syspatch/6.3/amd64
> > + sysctl -n hw.ncpufound
> > + let 2 > 1
> > + _BSDMP=true
> > + _PDIR=/var/syspatch
> > + mktemp -d -p /tmp syspatch.XXXXXXXXXX
> > + _TMP=/tmp/syspatch.JXvDQcTe2t
> > + _KARL=false
> > + readonly _BSDMP _KERNV _MIRROR _OSrev _PDIR _TMP
> > + trap trap_handler EXIT
> > + trap exit HUP INT TERM
> > + getopts clRr arg
> > + shift 0
> > + let 0 != 0
> > + let OPTIND == 1
> > + rm -f /bsd.syspatch+([[:digit:]])
> > + continue
> > + continue
> > + ls_missing
> > + _PATCHES=
> > + trap_handler
> > # echo $?
> > 1
> >
> > The problem was reported by Marco Di Pietro.
> >
> >
> > --
> > Juan Francisco Cantero Hurtado http://juanfra.info
> >
>
> --
> Antoine
>

--
Juan Francisco Cantero Hurtado http://juanfra.info