Skip to content

Commit

Permalink
- touch the logfile early, to see if we can write to it later
Browse files Browse the repository at this point in the history
  • Loading branch information
lrupp committed Jan 17, 2019
1 parent 090f764 commit 41f4717
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions suse.de-online-update
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ if [ -z "$LOGFILE" ]; then
fi
if [ ! -d "$LOGDIR" ]; then
mkdir -p "$LOGDIR" || exit 1
touch "$LOGFILE" || { echo "Could not create $LOGFILE"; cleanup_and_exit 1; }
echo "$LOG_DATE $HOST $LOGNAME[$$]: function LOG created $LOGDIR" > "$LOGFILE"
echo "$LOG_DATE $HOST $LOGNAME[$$]: created $LOGDIR" > "$LOGFILE"
fi
touch "$LOGFILE" || { echo "Could not create $LOGFILE"; cleanup_and_exit 1; }
if [ ! -w "$LOGFILE" ]; then
echo "Could not write to $LOGFILE - please fix" >&2
cleanup_and_exit 1
Expand Down

0 comments on commit 41f4717

Please sign in to comment.