it was matching MonkeySphere strings as full lines and therefore not
actually removing monkeysphere lines.
I'm not sure exactly why, upon further consideration, why we actually
need to be removing all monkeysphere lines in update_authorized_keys.
tempfile=$(mktemp "${file}.XXXXXXX") || \
failure "Could not make temporary file '${file}.XXXXXXX'."
- egrep -v '^MonkeySphere[[:digit:]]{4}(-[[:digit:]]{2}){2}T[[:digit:]]{2}(:[[:digit:]]{2}){2}$' \
- "$file" >"$tempfile"
+ egrep -v ' MonkeySphere[[:digit:]]{4}(-[[:digit:]]{2}){2}T[[:digit:]]{2}(:[[:digit:]]{2}){2} ' \
+ "$file" >"$tempfile" || true
cat "$tempfile" > "$file"
rm "$tempfile"
}