From fe0d42f3ef3376f1af3c30499e57ace338134bf3 Mon Sep 17 00:00:00 2001 From: LAN-TW Date: Wed, 4 Jan 2012 00:17:43 +0800 Subject: =?UTF-8?q?bash=5Finclude:=20=E6=94=B9=E5=96=84=E9=83=A8=E4=BB=BD?= =?UTF-8?q?=E8=AA=AA=E6=98=8E=E8=A8=8A=E6=81=AF=E3=80=81=E5=82=99=E4=BB=BD?= =?UTF-8?q?=E6=AA=94=E6=A1=88=E6=99=82=E4=BF=9D=E7=95=99=E6=99=82=E9=96=93?= =?UTF-8?q?=E6=88=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bash_include | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'bash_include') diff --git a/bash_include b/bash_include index b146d35..8561a65 100644 --- a/bash_include +++ b/bash_include @@ -289,7 +289,7 @@ function check_dmesg () do PREVIOS_DMESG_BUF="$DMESG_BUF" DMESG_BUF="`dmesg`" - [ "$PREVIOS_DMESG_BUF" '!=' "$DMESG_BUF" ] && [ "$FIRST_RUN" = "4" ] && echo '===> system message buffer was modified <===' + [ "$PREVIOS_DMESG_BUF" '!=' "$DMESG_BUF" ] && [ "$FIRST_RUN" = "0" ] && echo '===> You should check the system message buffer <===' sleep $1 [ "$?" '!=' "0" ] && return 1 FIRST_RUN=0 @@ -305,7 +305,7 @@ function prehistory_backup () previoushistorycount=`cat "$historycountfile"` if [ "$currentcount" -lt "$previoushistorycount" ] then - printf "\e[1;31mWarning\e[m: Your $HISTFILE may be MODIFIED OR TRUNCATED BY OTHER PROGRAMS!\n" + printf "\e[1;31mWarning\e[m: Your $HISTFILE may be TRUNCATED OR OVERWRITTEN BY OTHER PROGRAMS!\n" printf "Note: \e[1;33m$currentcount\e[m < $previoushistorycount\n" echo "Your $historycountfile and $historybackupfile will not be overwritten until this problem is fixed." echo " 1. Check your $HISTFILE." @@ -729,7 +729,8 @@ function backup_file () j=$j+1 continue else - "${prefixlist[@]}" \cp "${arglist[$i]}" "$rootfilename.$j" + "${prefixlist[@]}" \cp -p "${arglist[$i]}" "$rootfilename.$j" + "${prefixlist[@]}" touch -r "${arglist[$i]}" "$rootfilename.$j" break fi done @@ -740,6 +741,7 @@ function backup_file () fi else "${prefixlist[@]}" \cp -p "${arglist[$i]}" "$rootfilename" + "${prefixlist[@]}" touch -r "${arglist[$i]}" "$rootfilename" fi i=$i+1 done -- cgit v1.2.3