Make savecore check core file is accessible
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 13 Mar 2011 13:22:30 +0000 (14:22 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 11 Apr 2011 20:29:12 +0000 (22:29 +0200)
scripts/savecore

index 5b1fa9a77790dd9eef4b4eacdeebe3f6a77ad0a7..8acb42e7b87316cc33ac40bf3596dfdc56d3b85e 100755 (executable)
@@ -53,6 +53,8 @@ alert_deity ()
 test -n "$privlog" && trap 'alert_deity' EXIT
 
 core_name=`ls -td $core_pattern | head -n 1`
+test -n "$core_name"
+test -r "$core_name"
 saved_core=$core_dir/core-`/bin/date +%Y-%m-%d-%H:%M`
 
 mv -f $core_name $saved_core