# # Remove colour ls config #
echo "%Post: /etc/profile.d/ Fix-ups"
#
echo "%Post: remove "color" ls aliases done by RedHat"
rm /etc/profile.d/colorls.sh
rm /etc/profile.d/colorls.csh
echo "%Post: ensure group profile scripts are loaded"
cat >/etc/profile.d/ZZgroup.sh <<EOF
#
# If you are a member of a group then you should see if the
# owner of the group has a profile for you.
# Assuming that they have a profile then source it into
# the current running environment
for i in \`groups\`; do
if [ -r "/home/\${i}/current/etc/profile" ] ; then
. /home/\${i}/current/etc/profile
fi
done
EOF
cat >/etc/profile.d/ZZgroup.csh <<EOF
#
# If you are a member of a group then you should see if the
# owner of the group has a profile for you.
# Assuming that they have a profile then source it into
# the current running environment
set nonomatch
foreach i ( \`groups\` )
if ( -r "/home/\${i}/current/etc/csh.cshrc" ) then
source /home/\${i}/current/etc/csh.cshrc
endif
end
unset i nonomatch
EOF
chmod 755 /etc/profile.d/ZZgroup.sh
chmod 755 /etc/profile.d/ZZgroup.csh
Marked up in XHTML - ©2005 Thoughtful Solutions Ltd.