Better fixes.
This commit is contained in:
parent
a78baccc82
commit
e9b823bc39
5 changed files with 5 additions and 5 deletions
|
@ -58,7 +58,7 @@ state_should="$(cat "$__object/parameter/state" 2>/dev/null || echo "present")"
|
||||||
# These are the old markers
|
# These are the old markers
|
||||||
prefix="#cdist:__cron/$__object_id"
|
prefix="#cdist:__cron/$__object_id"
|
||||||
suffix="#/cdist:__cron/$__object_id"
|
suffix="#/cdist:__cron/$__object_id"
|
||||||
filter="^# DO NOT EDIT THIS FILE|^# \\(.* installed on |^# \\(Cron version V|^# \\(Cronie version .\\..\\)$"
|
filter='^# DO NOT EDIT THIS FILE|^# \(.* installed on |^# \(Cron version V|^# \(Cronie version .\..\)$'
|
||||||
cat << DONE
|
cat << DONE
|
||||||
crontab -u $user -l 2>/dev/null | grep -v -E "$filter" | awk -v prefix="$prefix" -v suffix="$suffix" '
|
crontab -u $user -l 2>/dev/null | grep -v -E "$filter" | awk -v prefix="$prefix" -v suffix="$suffix" '
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,7 +45,7 @@ else
|
||||||
# when $state=present, it's required. Enforce this.
|
# when $state=present, it's required. Enforce this.
|
||||||
if [ "$state" = "present" ]; then
|
if [ "$state" = "present" ]; then
|
||||||
exec >&2
|
exec >&2
|
||||||
echo "If --state is 'present,' --ip must be given\\!"
|
printf 'If --state is "present", --ip must be given\!\n'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -45,7 +45,7 @@ else
|
||||||
# when $state=present, it's required. Enforce this.
|
# when $state=present, it's required. Enforce this.
|
||||||
if [ "$state" = "present" ]; then
|
if [ "$state" = "present" ]; then
|
||||||
exec >&2
|
exec >&2
|
||||||
echo "If --state is 'present,' --ip must be given\\!"
|
printf 'If --state is "present", --ip must be given\!\n'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -39,7 +39,7 @@ case "$state_should" in
|
||||||
printf ' -o %s' "$(cat "$__object/parameter/options")"
|
printf ' -o %s' "$(cat "$__object/parameter/options")"
|
||||||
fi
|
fi
|
||||||
printf ' %s' "$(cat "$__object/parameter/device")"
|
printf ' %s' "$(cat "$__object/parameter/device")"
|
||||||
printf " %s\\n" "$path"
|
printf ' %s\n' "$path"
|
||||||
else
|
else
|
||||||
# mount using existing fstab entry
|
# mount using existing fstab entry
|
||||||
printf 'mount "%s"\n' "$path"
|
printf 'mount "%s"\n' "$path"
|
||||||
|
|
|
@ -95,7 +95,7 @@ if [ -n "$curr_version" ]; then # PKG *is* installed
|
||||||
if [ "$upgrade" = "true" ]; then
|
if [ "$upgrade" = "true" ]; then
|
||||||
execcmd "upg" "${cmd}"
|
execcmd "upg" "${cmd}"
|
||||||
else
|
else
|
||||||
printf "Version %s is already installed and pkg-ng can't upgrade directly to version %s.\\nTo upgrade to the latest version, use the --upgrade flag.\\n" "$curr_version" "$version" >&2
|
printf 'Version %s is already installed and pkg-ng cannot upgrade directly to version %s.\nTo upgrade to the latest version, use the --upgrade flag.\n' "$curr_version" "$version" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# PKG is supposed to be installed to the latest version
|
# PKG is supposed to be installed to the latest version
|
||||||
|
|
Loading…
Reference in a new issue