Merge pull request #5944 from chris5560/master
ddns-scripts: fixes "sed: no previous regexp"
This commit is contained in:
commit
3c5829a5dc
|
@ -12,7 +12,7 @@ PKG_NAME:=ddns-scripts
|
||||||
PKG_VERSION:=2.7.7
|
PKG_VERSION:=2.7.7
|
||||||
# Release == build
|
# Release == build
|
||||||
# increase on changes of services files or tld_names.dat
|
# increase on changes of services files or tld_names.dat
|
||||||
PKG_RELEASE:=4
|
PKG_RELEASE:=5
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
|
PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
|
||||||
|
|
|
@ -262,9 +262,9 @@ write_log() {
|
||||||
[ $VERBOSE -gt 0 -o $__EXIT -gt 0 ] && echo -e "$__MSG"
|
[ $VERBOSE -gt 0 -o $__EXIT -gt 0 ] && echo -e "$__MSG"
|
||||||
# write to logfile
|
# write to logfile
|
||||||
if [ ${use_logfile:-1} -eq 1 -o $VERBOSE -gt 1 ]; then
|
if [ ${use_logfile:-1} -eq 1 -o $VERBOSE -gt 1 ]; then
|
||||||
printf "%s\n" "$__MSG" | \
|
[ -n "$password" ] && __MSG=$( printf "%s" "$__MSG" | sed -e "s/$password/*password*/g" )
|
||||||
sed -e "s/$password/*password*/g; \
|
[ -n "$URL_PASS" ] && __MSG=$( printf "%s" "$__MSG" | sed -e "s/$URL_PASS/*URL_PASS*/g" )
|
||||||
s/$URL_PASS/*URL_PASS*/g" >> $LOGFILE
|
printf "%s\n" "$__MSG" >> $LOGFILE
|
||||||
# VERBOSE > 1 then NO loop so NO truncate log to $ddns_loglines lines
|
# VERBOSE > 1 then NO loop so NO truncate log to $ddns_loglines lines
|
||||||
[ $VERBOSE -gt 1 ] || sed -i -e :a -e '$q;N;'$ddns_loglines',$D;ba' $LOGFILE
|
[ $VERBOSE -gt 1 ] || sed -i -e :a -e '$q;N;'$ddns_loglines',$D;ba' $LOGFILE
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue