Compare commits
3 Commits
a507e9c29c
...
7b01bcf456
Author | SHA1 | Date | |
---|---|---|---|
7b01bcf456 | |||
e06c5acb1c | |||
ada0105f7f |
@ -19,7 +19,13 @@ exec_git_command () {
|
|||||||
|
|
||||||
log_debug "$func:${LINENO} exec-ing [$*]"
|
log_debug "$func:${LINENO} exec-ing [$*]"
|
||||||
|
|
||||||
exec {fd}< <($@)
|
exec {fd}< <(eval "$@")
|
||||||
|
|
||||||
|
# if [ "$*" = "git pull" ]; then
|
||||||
|
# else
|
||||||
|
# exec {fd}< <($@)
|
||||||
|
# fi
|
||||||
|
|
||||||
local ps_pid=$! # remember pid of process substitution
|
local ps_pid=$! # remember pid of process substitution
|
||||||
|
|
||||||
local git_result=""
|
local git_result=""
|
||||||
|
13
update_psa
13
update_psa
@ -112,21 +112,16 @@ update() {
|
|||||||
revert_customer_repository ; exit 1
|
revert_customer_repository ; exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# FIXME: sollte am anfang so gesetzt werden
|
|
||||||
SAVEIFS=$IFS
|
|
||||||
IFS=$'\n'
|
|
||||||
if ! check_md5_for_opkg_packages opkg_output; then
|
if ! check_md5_for_opkg_packages opkg_output; then
|
||||||
log_error "$func:${LINENO}: wrong md5sum for some opkg packages"
|
log_error "$func:${LINENO}: wrong md5sum for some opkg packages"
|
||||||
revert_customer_repository ; exit 1
|
revert_customer_repository ; exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
IFS=$SAVEIFS
|
|
||||||
|
|
||||||
# perform a dry-run and check if everything might work as expected.
|
# perform a dry-run and check if everything might work as expected.
|
||||||
|
|
||||||
# Actually execute the opkg command
|
# Actually execute the opkg command
|
||||||
if ! exec_opkg $opkg_command; then
|
if ! exec_opkg $opkg_command; then
|
||||||
log_error "$func:${LINENO}: do_update failed"
|
log_error "$func:${LINENO}: exec_opkg $opkg_command failed"
|
||||||
fallback_to_previous_version
|
fallback_to_previous_version
|
||||||
revert_customer_repository ; exit 1
|
revert_customer_repository ; exit 1
|
||||||
fi
|
fi
|
||||||
@ -150,9 +145,9 @@ if [ $# -ne 1 ] ; then
|
|||||||
echo "Usage: $0 filename"
|
echo "Usage: $0 filename"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
# if [ -z $IFS ]; then
|
if [ -z $IFS ]; then
|
||||||
# IFS=$'\n'
|
IFS=$'\n'
|
||||||
# fi
|
fi
|
||||||
|
|
||||||
if read_config "$1" ; then
|
if read_config "$1" ; then
|
||||||
# set -x
|
# set -x
|
||||||
|
@ -11,7 +11,7 @@ exec_opkg_command () {
|
|||||||
|
|
||||||
log_debug "$func:${LINENO} exec-ing [$*]"
|
log_debug "$func:${LINENO} exec-ing [$*]"
|
||||||
|
|
||||||
exec {fd}< <($@)
|
exec {fd}< <(eval "$@")
|
||||||
local ps_pid=$! # remember pid of process substitution
|
local ps_pid=$! # remember pid of process substitution
|
||||||
|
|
||||||
local opkg_result=""
|
local opkg_result=""
|
||||||
@ -138,6 +138,10 @@ exec_opkg_no_action() {
|
|||||||
#
|
#
|
||||||
exec_opkg () {
|
exec_opkg () {
|
||||||
local func="${FUNCNAME[0]}"
|
local func="${FUNCNAME[0]}"
|
||||||
|
log_info "$func:${LINENO}: executing $opkg_command"
|
||||||
|
|
||||||
|
local opkg_result=$(exec_opkg_command "opkg $1")
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user