Installation script of "aaa_base"
#
#
# post.sh - to be done after extraction
#
# Copyright (c) 1996 S.u.S.E. GmbH Fuerth, Germany.
#
#
#
# to make shure, var/lib/YaST/bin/bootsetup runs fine, delete
# usr/lib/YaST/.configured2
test -e usr/lib/YaST/.configured2 && rm -f usr/lib/YaST/.configured2
#
# there are some installation with an etc/psdevtab, which is only readable
# for root - this slows ps for any other user. starting ps as root, creates
# it, when it doesn't exist (readable). So simply delete it.
#
test -e etc/psdevtab && rm -f etc/psdevtab
if [ ! -e etc/rc.config ]; then
echo "#
# /etc/rc.config
#
# Copyright (c) 1996,98 S.u.S.E. GmbH Fuerth, Germany. All rights reserved.
#
# Author: Florian La Roche , 1996
# Werner Fink , 1996
# Burchard Steinbild , 1996
#
# Configuration database for shell scripts in /sbin/init.d, /sbin/SuSEconfig
# and /root/bin/cron.daily
#
# Please edit this file and execute /sbin/SuSEconfig to configure everything.
# Also don't forget to edit the following files:
# - /etc/lilo.conf
# - /etc/fstab
# - /etc/profile
# - /etc/hosts
#
" > etc/rc.config
cat var/adm/fillup-templates/rc.config.aaa_base >> etc/rc.config
chmod 644 etc/rc.config
else
echo "Updating etc/rc.config..."
if [ -x bin/fillup ] ; then
bin/fillup -q -d = etc/rc.config var/adm/fillup-templates/rc.config.aaa_base
else
echo "ERROR: fillup not found. This should not happen. Please compare"
echo "etc/rc.config and var/adm/fillup-templates/rc.config.aaa_base "
echo "and update by hand."
fi
fi
if [ -x bin/fillup ] ; then
for i in passwd group shadow gshadow ; do
test -e var/adm/fillup-templates/$i.aaa_base || continue
if [ -e etc/$i ] ; then
cp etc/$i etc/$i.t
cat etc/$i | grep -v "^+" > etc/$i.tt
test -s etc/$i.tt && mv etc/$i.tt etc/$i
else
touch etc/$i
fi
if [ -e var/adm/fillup-templates/$i.aaa_base ] ; then
echo "Updating etc/$i..."
bin/fillup -q -d ":" etc/$i var/adm/fillup-templates/$i.aaa_base
else
echo "Cannot find var/adm/fillup-templates/$i.aaa_base. strange..."
fi
if [ -e etc/$i.t ] ; then
grep "^+" etc/$i.t >> etc/$i
rm -f etc/$i.t etc/$i.tt
fi
case $i in
*shadow)
chmod 600 etc/$i
;;
esac
done
else
echo "ERROR: fillup not found. This should not happen."
fi
#
# If we have a NIS system, we have to make sure, that "^+" is at the end
# of passwd.
#
grep -v "^+" etc/passwd > etc/passwd.tmp
grep "^+" etc/passwd >> etc/passwd.tmp
test -s etc/passwd.tmp && cat etc/passwd.tmp > etc/passwd
rm -f etc/passwd.tmp
#
# create mtab if it does not exist
#
touch etc/mtab
#
# make sure that several log files exist
#
if test ! -d var/log ; then
mkdir -p var/log
fi
touch var/log/faillog
chmod 600 var/log/faillog
chown root.root var/log/faillog
touch var/log/lastlog
chmod 644 var/log/lastlog
chown root.root var/log/lastlog
touch var/log/wtmp
chmod 664 var/log/wtmp
chown root.tty var/log/wtmp
if test ! -e usr/sbin/usradd.local ; then
mkdir -p usr/sbin
cat << EOT > usr/sbin/usradd.local
#!/bin/bash
#
# Here you can add your own stuff, that should be done for every new user.
#
# When you create a new user with YaST, this script will be called
# with the new login name as parameter. The rest of data can be taken
# from /etc/passwd.
#
EOT
chmod 744 usr/sbin/usradd.local
fi
if test ! -e usr/sbin/usrdel.local ; then
mkdir -p usr/sbin
cat << EOT > usr/sbin/usrdel.local
#!/bin/bash
#
# Here you can add your own stuff, that should be done for every user who
# will be deleted.
#
# When you delete a user with YaST, this script will be called
# with the login name as parameter. The rest of data can be taken
# from /etc/passwd.
#
EOT
chmod 744 usr/sbin/usrdel.local
fi
XSUSE_FOUND=""
for i in XSuSE_AT3D XSuSE_Matrox XSuSE_NVidia \
XSuSE_Trident XSuSE_Tseng XSuSE_Mach64 ; do
test -e usr/X11R6/bin/$i && XSUSE_FOUND="$XSUSE_FOUND $i"
done
if test -n "$XSUSE_FOUND" ; then
mkdir -p var/adm/notify/messages
cat << EOT > var/adm/notify/messages/XSuSE-Server
Hallo, (english text below)
Ihr System enthaelt die/den aelteren SuSE Server $XSUSE_FOUND.
Diese Server sind mittlerweile in die XFree86 Version eingeflossen.
Wenn Sie die neue Version installiert haben, koennen Sie mittels XF86Setup
auf die neue Version umsteigen.
Hello,
your system contains the old SuSE Server $XSUSE_FOUND.
These servers are now part of the XFree86 servers. If you have installed
the new version, you can switch to it using XF86Setup.
Have a lot of fun...
Your S.u.S.E. Team
EOT
fi
XSERVER_FOUND=false
for i in usr/X11R6/bin/XF86_* ; do
test -f $i && XSERVER_FOUND=true
done
if test $XSERVER_FOUND = true ; then
mkdir -p var/adm/notify/messages
cat << EOT > var/adm/notify/messages/Xwrapper
Hallo, (english text below)
Seit der Version 3.3.2 von XFree86 (enthalten in dieser Distribution) werden
bei den XServern keine suid root Bits mehr gesetzt. Stattdessen werden diese
Server mittels Xwrapper gestartet. Wenn Sie das Paket aaa_base updaten ohne
auch die neue Version des XFree86 zu installieren, koennen Sie nicht ohne
weiteres mittels startx das X11 System starten (Starten mittels xdm geht
weiterhin).
Moegliche Loesungen sind:
1. Neues XFree86 verwenden.
oder
2. Aendern sie in der Datein /etc/permissions in der Zeile mit Ihrem
Server (/usr/X11R6/bin/XF86_*) 755 auf 4755 und rufen Sie SuSEconfig auf.
Eine weitere "Fehlermoeglichkeit" ist die Existenz einer .xserverrc im Home-
Verzeichnis des Benutzers. Wenn Sie dort den Xwrapper statt des X-Servers
starten, sollte auch dieses Skript wieder funktionieren.
Hi,
Since version 3.3.2 of XFree86 (included in this distribution) the servers
are not set suid root anymore. startx does now use Xwrapper to start the
server. If you have updated aaa_base without updating the XFree86, startx
will not work (xdm does still work).
Solutions:
1. Install new XFree86.
or
2. Change the entry for your Server in /etc/permissions
(/usr/X11R6/bin/XF86_*) from 755 to 4755 and run SuSEconfig.
A existing ~/.xserverrc also can make trouble. Start Xwrapper instead
of the X-Server and it should work again.
Have a lot of fun...
Your S.u.S.E. Team
EOT
fi
(c) S.u.S.E. - Last update: 18.08.98 09:06;