Skip to content

Commit 352f867

Browse files
committed
Make remove_group_inline() only backup the inline-file to be removed
Remove unset -v inline_hash; easy-tls no longer supports inline_renew() Signed-off-by: Richard T Bonhomme <[email protected]>
1 parent 59d057d commit 352f867

File tree

1 file changed

+3
-23
lines changed

1 file changed

+3
-23
lines changed

easytls

+3-23
Original file line numberDiff line numberDiff line change
@@ -3158,12 +3158,6 @@ remove_inline ()
31583158
die "Failed to update inline-index"
31593159
fi
31603160

3161-
# Inline file and record deleted - Forget the HASH
3162-
# Otherwise 'inline_renew add' still has the HASH
3163-
# Logically, this *cannot* be removed -- tct
3164-
# Improve this! please..
3165-
unset -v inline_hash
3166-
31673161
if [ -z "${force_remove}" ]; then
31683162
notice "Inline file removed: ${inline_file}"
31693163
else
@@ -3221,7 +3215,7 @@ remove_group_inline ()
32213215

32223216
# Move
32233217
if [ -z "${force_remove}" ]; then
3224-
"${EASYTLS_MV}" "${inline_file}" "${inline_file}-deleted" || \
3218+
"${EASYTLS_MV}" "${inline_file}" "${EASYTLS_TEMP_DELETED}" || \
32253219
die "Failed to move: ${inline_file}"
32263220
else
32273221
"${EASYTLS_MV}" "${inline_file}" "${inline_file}-badhash" || \
@@ -3232,21 +3226,13 @@ remove_group_inline ()
32323226
if inline_index_update del; then
32333227
# Remove
32343228
if [ -z "${force_remove}" ]; then
3235-
"${EASYTLS_RM}" "${inline_file}-deleted" || \
3229+
"${EASYTLS_RM}" "${EASYTLS_TEMP_DELETED}" || \
32363230
die "Failed to remove: ${inline_file}"
32373231
fi
32383232
else
3239-
# Restore original inline-index
3240-
if [ -f "${EASYTLS_INLINE_INDEX}-deleted" ]; then
3241-
"${EASYTLS_RM}" -f "${EASYTLS_INLINE_INDEX}"
3242-
"${EASYTLS_MV}" "${EASYTLS_INLINE_INDEX}-deleted" \
3243-
"${EASYTLS_INLINE_INDEX}" || \
3244-
die "remove_inline - Restore original inline-index"
3245-
fi
3246-
32473233
# Undo move
32483234
if [ -z "${force_remove}" ]; then
3249-
"${EASYTLS_MV}" "${inline_file}-deleted" "${inline_file}" || \
3235+
"${EASYTLS_MV}" "${EASYTLS_TEMP_DELETED}" "${inline_file}" || \
32503236
die "Failed to restore: ${inline_file}"
32513237
else
32523238
"${EASYTLS_MV}" "${inline_file}-badhash" "${inline_file}" || \
@@ -3256,12 +3242,6 @@ remove_group_inline ()
32563242
die "Failed to update inline-index"
32573243
fi
32583244

3259-
# Inline file and record deleted - Forget the HASH
3260-
# Otherwise 'inline_renew add' still has the HASH
3261-
# Logically, this *cannot* be removed -- tct
3262-
# Improve this! please..
3263-
unset -v inline_hash
3264-
32653245
if [ -z "${force_remove}" ]; then
32663246
notice "Inline file removed: ${inline_file}"
32673247
else

0 commit comments

Comments
 (0)