Revision 573ec19d
Added by Renato Botelho over 4 years ago
src/etc/rc.update_pkg_metadata | ||
---|---|---|
24 | 24 |
fi |
25 | 25 |
|
26 | 26 |
# Read product_name from $g, defaults to pfSense |
27 |
product=$(/usr/local/sbin/read_global_var product_name pfSense) |
|
27 |
product_name=$(/usr/local/sbin/read_global_var product_name pfSense)
|
|
28 | 28 |
|
29 |
tmp_version=$(mktemp -q /tmp/${product}_version.XXXXXXXX) \ |
|
29 |
tmp_version=$(mktemp -q /tmp/${product_name}_version.XXXXXXXX) \
|
|
30 | 30 |
|| exit 1 |
31 | 31 |
|
32 | 32 |
( \ |
33 | 33 |
sleep $sleep_time \ |
34 | 34 |
&& /usr/local/bin/php -r 'require_once("pkg-utils.inc");update_repos();' \ |
35 |
&& /usr/local/sbin/${product}-upgrade -uf \ |
|
35 |
&& /usr/local/sbin/${product_name}-upgrade -uf \
|
|
36 | 36 |
&& ( \ |
37 |
/usr/local/sbin/${product}-upgrade -Uc > ${tmp_version}.tmp \ |
|
37 |
/usr/local/sbin/${product_name}-upgrade -Uc > ${tmp_version}.tmp \
|
|
38 | 38 |
; rc=$? \ |
39 | 39 |
; tail -n 1 ${tmp_version}.tmp > $tmp_version \ |
40 | 40 |
; rm -f ${tmp_version}.tmp \ |
... | ... | |
42 | 42 |
; test $rc -eq 2 && return 0 || return $rc \ |
43 | 43 |
) \ |
44 | 44 |
&& ( \ |
45 |
mv $tmp_version /var/run/${product}_version \ |
|
46 |
&& mv ${tmp_version}.rc /var/run/${product}_version.rc \ |
|
45 |
mv $tmp_version /var/run/${product_name}_version \
|
|
46 |
&& mv ${tmp_version}.rc /var/run/${product_name}_version.rc \
|
|
47 | 47 |
) || rm -f $tmp_version ${tmp_version}.rc |
48 | 48 |
) >/dev/null 2>&1 & |
49 | 49 |
|
Also available in: Unified diff
Add product_label global variable
Introduce product_label global variable, by default with same value of
product_name. The idea is to make it easier for rebranded products to
change the name on all visual texts while internal structures are
preserved.
While here, remove deprecated $g['platform'] and also replace places
with pfSense hardcoded on text messages by $g['product_label'].
No functional changes are expected.