pkg://shell-idleout-1.0-0.src.rpm:1642/shell-idleout.spec
info downloads
Summary: Logout idling shells
Name: shell-idleout
Packager: Riku Meskanen <mesrik@cc.jyu.fi>
Version: 1.0
Release: 0
Copyright: GPL
Group: Utilities/Sysadmin
#BuildArchitectures: noarch
BuildRoot: /var/tmp/shell-idleout
Requires: setup >= 1.7
Requires: sh-utils
%description
Sets 60 minutes idleout default for sh and csh family shells.
%build
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/etc/profile.d
cat <<EOF >$RPM_BUILD_ROOT/etc/profile.d/shell-idleout.sh
if [ -t ]; then # interactive
TMOUT=3600
export TMOUT
fi
EOF
cat <<EOF >$RPM_BUILD_ROOT/etc/profile.d/shell-idleout.csh
/usr/bin/tty -s >& /dev/null
if ( ! \$status ) then # interactive
setenv TMOUT 3600
set autologout=60
endif
EOF
install -m 755 -o root -g root \
$RPM_BUILD_ROOT/etc/profile.d/shell-idleout.{,c}sh /etc/profile.d
%clean
rm -rf $RPM_BUILD_ROOT
#rm -f /etc/profile.d/shell-idleout.{,c}sh
%post
chmod 755 /etc/profile.d/shell-idleout.{,c}sh
%files
/etc/profile.d/shell-idleout.sh
/etc/profile.d/shell-idleout.csh