diff options
Diffstat (limited to 'rc.d/rc')
-rwxr-xr-x | rc.d/rc | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -10,13 +10,15 @@ # check a file to be a correct runlevel script check_runlevel () { - # Check if the script is there. - [ -f "$1" ] || return 1 + # Check if the file exists at all. + [ -x "$1" ] || return 1 - # Don't run [KS]??foo.{rpmsave,rpmorig} scripts - [ "${1%.rpmsave}" != "$1" ] && return 1 - [ "${1%.rpmorig}" != "$1" ] && return 1 - [ "${1%.rpmnew}" != "$1" ] && return 1 + # Reject backup files and files generated by rpm. + case "$1" in + *.rpmsave|*.rpmorig|*.rpmnew|*~|*.orig) + return 1 + ;; + esac return 0 } |