change fixfiles to only use terminal for logging if specified

This commit is contained in:
Daniel J Walsh 2004-09-23 16:40:36 +00:00
parent 1615759700
commit 6a9a40b3c1
2 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,5 @@
--- policycoreutils-1.17.5/scripts/fixfiles.rhat 2004-08-30 11:46:47.000000000 -0400
+++ policycoreutils-1.17.5/scripts/fixfiles 2004-09-21 15:20:00.328279768 -0400
+++ policycoreutils-1.17.5/scripts/fixfiles 2004-09-23 12:37:51.805467493 -0400
@@ -36,6 +36,8 @@
FILESYSTEMSRO=`mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)' | awk '/(ext[23]| xfs | reiserfs ).*\(ro/{print $3}';`
FILESYSTEMS="$FILESYSTEMSRW $FILESYSTEMSRO"
@ -131,7 +131,7 @@
+done
+
+if [ $logfileFlag = 0 ]; then
+ LOGFILE=`tty`
+ LOGFILE=`mktemp /var/tmp/fixfiles.log.XXXXXXXXXX`
+ if [ ! -w $LOGFILE ] ; then
+ rm -f $FCFILE
+ exit 1

View File

@ -1,7 +1,7 @@
Summary: SELinux policy core utilities.
Name: policycoreutils
Version: 1.17.5
Release: 3
Release: 4
License: GPL
Group: System Environment/Base
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
@ -77,6 +77,9 @@ rm -rf ${RPM_BUILD_ROOT}
%changelog
* Thu Sep 23 2004 Dan Walsh <dwalsh@redhat.com> 1.17.5-4
- Change to only display to terminal if tty is specified
* Tue Sep 21 2004 Dan Walsh <dwalsh@redhat.com> 1.17.5-3
- Only display to stdout if logfile not specified