Project

General

Profile

« Previous | Next » 

Revision 870dcf67

Added by Renato Botelho almost 8 years ago

Save pkg update return code

View differences:

src/etc/rc.update_pkg_metadata
32 32
	sleep $sleep_time \
33 33
	&& /usr/local/sbin/${product}-upgrade -uf \
34 34
	&& ( \
35
		/usr/local/sbin/${product}-upgrade -Uc >> $tmp_version \
36
		; test $? -eq 2 && return 0 \
35
		/usr/local/sbin/${product}-upgrade -Uc > $tmp_version \
36
		; rc=$? \
37
		; echo $rc > ${tmp_version}.rc \
38
		; test $rc -eq 2 && return 0 || return $rc \
37 39
	) \
38
	&& mv $tmp_version /var/run/${product}_version \
39
	|| rm -f $tmp_version
40
	&& ( \
41
		mv $tmp_version /var/run/${product}_version \
42
		&& mv ${tmp_version}.rc /var/run/${product}_version.rc \
43
	) || rm -f $tmp_version ${tmp_version}.rc
40 44
) >/dev/null 2>&1 &
41 45

  
42 46
exit 0

Also available in: Unified diff