aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/functions
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d/init.d/functions')
-rwxr-xr-xrc.d/init.d/functions12
1 files changed, 12 insertions, 0 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 19a86c16..2576f463 100755
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -573,3 +573,15 @@ resolve_dm_name() {
/sbin/dmsetup table | egrep -iv "no block devices found|No devices found" | sed -n "s/\(^[^:]\+\): $newline\( \+$\|$\)/\1/p"
) 2>/dev/null
}
+
+# Check whether file $1 is a backup or rpm-generated file and should be ignored
+is_ignored_file() {
+ case "$1" in
+ *~ | *.bak | *.orig | *.rpmnew | *.rpmorig | *.rpmsave)
+ return 0
+ ;;
+ esac
+ return 1
+}
+# A sed expression to filter out the files that is_ignored_file recognizes
+__sed_discard_ignored_files='/\(~\|\.bak\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d'