SHA256
1
0
forked from pool/aaa_base
OBS User unknown 2009-07-30 15:51:56 +00:00 committed by Git OBS Bridge
parent 74b7890633
commit a11de1547e
5 changed files with 21 additions and 134 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Jul 30 16:27:24 CEST 2009 - ro@suse.de
- drop hacks for sles8 from pre/post scripts
- make use of sed -i instead of manual handling in pre/post
- aaa_base.specialfilelist: drop the ones that are not in aaa_base
-------------------------------------------------------------------
Thu Jul 23 12:39:04 CEST 2009 - werner@suse.de

View File

@ -19,20 +19,10 @@ test -e usr/lib/YaST/.configured2 && rm -f usr/lib/YaST/.configured2
#
test -e etc/psdevtab && rm -f etc/psdevtab
#
# if the old inittab contains "/sbin/init.d", move it away
# and use inittab.rpmnew. RPM will overwrite old rpmnew files, so this
# should really the new one.
#
test -f etc/inittab.rpmnew && grep sbin.init.d etc/inittab >/dev/null 2>&1 && {
mv -f etc/inittab etc/inittab.sbin.init.d
mv -f etc/inittab.rpmnew etc/inittab
}
#
# if the old nsswitch.conf contains dns6, replace it with dns
#
test -f etc/nsswitch.conf.rpmnew && grep dns6 etc/nsswitch.conf >/dev/null 2>&1 && {
cp etc/nsswitch.conf etc/nsswitch.conf.aaa_base
sed "s|dns6|dns|g" < etc/nsswitch.conf.aaa_base > etc/nsswitch.conf
sed -i -e "s|dns6|dns|g" etc/nsswitch.conf
}
# GMT might already be in sysconfig/clock
%{rename_sysconfig_variable -f etc/sysconfig/clock GMT HWCLOCK}
@ -65,15 +55,12 @@ for i in language backup boot kernel \
done
# migrate HALT_SOUND value if set before
if [ -n "$HALT_SOUND" -a "$HALT_SOUND" != "no" ] ; then
sed -e "s|^HALT_SOUND=.*|HALT_SOUND=\"$HALT_SOUND\"|" \
etc/sysconfig/shutdown > etc/sysconfig/shutdown.new \
&& mv etc/sysconfig/shutdown.new etc/sysconfig/shutdown
sed -i -e "s|^HALT_SOUND=.*|HALT_SOUND=\"$HALT_SOUND\"|" etc/sysconfig/shutdown
fi
# fix sysconfig backup dir
if grep -q RCCONFIG_BACKUP_DIR../var/adm/backup/rpmdb etc/sysconfig/backup; then
sed -e "s|^RCCONFIG_BACKUP_DIR=.*|RCCONFIG_BACKUP_DIR=\"/var/adm/backup/sysconfig\"|" \
etc/sysconfig/backup > etc/sysconfig/backup.new \
&& mv etc/sysconfig/backup.new etc/sysconfig/backup
sed -i -e "s|^RCCONFIG_BACKUP_DIR=.*|RCCONFIG_BACKUP_DIR=\"/var/adm/backup/sysconfig\"|" \
etc/sysconfig/backup
mkdir -p /var/adm/backup/sysconfig
mv /var/adm/backup/rpmdb/sysconfig[-_]* /var/adm/backup/sysconfig 2>/dev/null
fi
@ -89,10 +76,8 @@ for i in $MODULES_LOADED_ON_BOOT ; do
MLOB_NEW="$MLOB_NEW${MLOB_NEW:+ }$i"
done
if test "$MODULES_LOADED_ON_BOOT" != "$MLOB_NEW" ; then
sed -e "s|^MODULES_LOADED_ON_BOOT=.*|MODULES_LOADED_ON_BOOT=\"$MLOB_NEW\"|" \
etc/sysconfig/kernel > etc/sysconfig/kernel.new \
&& mv etc/sysconfig/kernel.new etc/sysconfig/kernel
rm -f etc/sysconfig/kernel.new
sed -i -e "s|^MODULES_LOADED_ON_BOOT=.*|MODULES_LOADED_ON_BOOT=\"$MLOB_NEW\"|" \
etc/sysconfig/kernel
fi
#
# Backup gshadow file and remove it (merge passwords into
@ -139,17 +124,6 @@ for i in etc/shadow ; do
chgrp shadow $i
done
#
# make sure that nobody and nogroup are set to 65534 (we had -2 in former times)
#
for i in etc/passwd etc/group ; do
sed -e"s/:-2:/:65534:/g" -e"s/:-2:/:65534:/g" < $i > $i.t
test -s $i.t && {
cat $i.t > $i
}
rm -f $i.t
chmod 644 $i
done
#
# Change primary group of nobody to nobody
#
if [ -x /usr/sbin/usermod ]; then
@ -204,22 +178,9 @@ EOT
chmod 744 usr/sbin/userdel.local
fi
#
# Now do the ugly part. Delete mess from former times...
#
if test -L usr/i486-linux-libc6/lib/libqimgio.so ; then
rm -f usr/i486-linux-libc6/lib/libqimgio.so
fi
# change all /media mounts (subfs) to noauto
if test -f /etc/fstab ; then
rm -f /etc/fstab.$$
sed -e '/^[[:space:]]*#/{p;d}' -e '/[[:space:]]subfs.*noauto/{p;d}' -e '/\/media.*fs=\(cdfss\|floppyfss\)/s/\([[:space:]]subfs[[:space:]][[:space:]]*\)/\1noauto,/' < /etc/fstab > /etc/fstab.$$
cmp -s /etc/fstab /etc/fstab.$$ || {
mv /etc/fstab.$$ /etc/fstab
chmod 644 /etc/fstab
}
rm -f /etc/fstab.$$
sed -i -e '/^[[:space:]]*#/{p;d}' -e '/[[:space:]]subfs.*noauto/{p;d}' -e '/\/media.*fs=\(cdfss\|floppyfss\)/s/\([[:space:]]subfs[[:space:]][[:space:]]*\)/\1noauto,/' /etc/fstab
fi
# IA64 Altix update hook
@ -227,20 +188,11 @@ if test -d /proc/sgi_sn ; then
if grep -q "console=ttyS0" /etc/elilo.conf ; then
echo "replacing ttyS0 by ttySG0 in elilo.conf, inittab and securetty files"
#
rm -f /etc/elilo.conf.tmp
sed -e "s/console=ttyS0/console=ttySG0/g" /etc/elilo.conf > /etc/elilo.conf.tmp
cat /etc/elilo.conf.tmp > /etc/elilo.conf
rm -f /etc/elilo.conf.tmp
sed -i -e "s/console=ttyS0/console=ttySG0/g" /etc/elilo.conf
#
rm -f /etc/inittab.tmp
sed -e "s/getty\(.*\)ttyS0/getty\1ttySG0/g" /etc/inittab > /etc/inittab.tmp
cat /etc/inittab.tmp > /etc/inittab
rm -f /etc/inittab.tmp
sed -i -e "s/getty\(.*\)ttyS0/getty\1ttySG0/g" /etc/inittab
#
rm -f /etc/securetty.tmp
sed -e "s/ttyS0/ttySG0/g" /etc/securetty > /etc/securetty.tmp
cat /etc/securetty.tmp > /etc/securetty
rm -f /etc/securetty.tmp
sed -i -e "s/ttyS0/ttySG0/g" /etc/securetty
#
if grep -q /boot/efi /proc/mounts ; then
echo "calling elilo to update"

View File

@ -95,36 +95,6 @@ while read LINE ; do
esac
done < var/adm/fillup-templates/passwd.aaa_base
# etc/passwd update
if test -e etc/passwd ; then
sed "
# re-do these users on update, their home-dir was changed
/^news:\|^uucp:\|^man:\|^ftp:.*:.usr.local.ftp:/d
# change group of wwwrun: nogroup -> www
s|^wwwrun:x:30:65534:|wwwrun:x:30:8:|
# change login shell of wwwrun
s|^\(wwwrun:x:30:8:.*:\)/bin/bash|\1/bin/false|
" < etc/passwd > etc/passwd.t
cat etc/passwd.t > etc/passwd
rm -f etc/passwd.t
fi
if test -e etc/shadow ; then
# nobody had sp_lstchg set to 0 in 8.0 and older
sed "/^nobody:[^:]*:0:/d" < etc/shadow > etc/shadow.t
cat etc/shadow.t > etc/shadow
rm -f etc/shadow.t
fi
# Rename game -> games, wwwadmin -> www
for i in etc/group ; do
if test -e $i ; then
sed -e "s|^game:|games:|" -e "s|^wwwadmin:|www:|" $i > $i.t
cat $i.t > $i
rm -f $i.t
fi
done
for file in passwd group ; do
if test -f etc/$file ; then
@ -141,11 +111,6 @@ for file in passwd group ; do
fi
done
if test -d sbin/init.d -a ! -L sbin/init.d ; then
if test -L etc/init.d ; then
rm -f etc/init.d
fi
fi
#
# we have several local files, that changed over the time. Check the
# existing one, if they contain real data. If not, delete them.
@ -153,8 +118,6 @@ fi
for LOCALFILE in root/bin/cron.daily.local \
etc/init.d/boot.local \
etc/init.d/halt.local \
sbin/init.d/boot.local \
sbin/init.d/halt.local \
usr/sbin/usradd.local \
usr/sbin/usrdel.local \
usr/sbin/userdel.local ; do
@ -198,11 +161,6 @@ echo "#! /bin/sh
# before we're going to the first run level.
#
" > etc/init.d/boot.local.new
if [ ! -e etc/init.d/boot.local ] ; then
if [ -e sbin/init.d/boot.local ] ; then
mv sbin/init.d/boot.local etc/init.d/boot.local
fi
fi
test -e etc/init.d/boot.local || mv etc/init.d/boot.local.new etc/init.d/boot.local
rm -f etc/init.d/boot.local.new
chmod 744 etc/init.d/boot.local
@ -221,11 +179,6 @@ echo "#! /bin/sh
# down.
#
" > etc/init.d/halt.local.new
if [ ! -e etc/init.d/halt.local ] ; then
if [ -e sbin/init.d/halt.local ] ; then
mv sbin/init.d/halt.local etc/init.d/halt.local
fi
fi
test -e etc/init.d/halt.local || mv etc/init.d/halt.local.new etc/init.d/halt.local
rm -f etc/init.d/halt.local.new
chmod 744 etc/init.d/halt.local
@ -237,17 +190,6 @@ for LINK in usr/X11R6/lib/X11 var/X11R6/lib/fonts usr/lib/mgetty+sendfax \
rm -f $LINK
fi
done
for DIR in etc/rc.d usr/X11 ; do
if test -d $DIR -a ! -L $DIR ; then
echo -n "Found oldish directory /$DIR. "
if test -d $DIR.old ; then
echo /$DIR.old already exist. Can not move /$DIR to it.
else
echo Moving it to /$DIR.old
mv $DIR $DIR.old
fi
fi
done
if test -f /root/.gnupg/secring.gpg ; then
cp -a /root/.gnupg/secring.gpg /root/.gnupg/secring.gpg.aaa_save

View File

@ -28,7 +28,7 @@ Recommends: cron logrotate netcfg udev net-tools
PreReq: /usr/bin/sed /usr/bin/grep /bin/mv /bin/cat /bin/ls /bin/date /usr/bin/cmp /bin/fillup /sbin/insserv
AutoReqProv: on
Version: 11.2
Release: 34
Release: 35
Summary: SUSE Linux Base Package
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: aaa_base.tar.bz2

View File

@ -1,6 +1,5 @@
%config(noreplace) /root/.exrc
%config(noreplace) /etc/DIR_COLORS
%config(noreplace) /etc/host.conf
%config(noreplace) /etc/inittab
%config /root/bin/cron.daily
%config /root/bin/cron.daily.local
@ -8,14 +7,8 @@
%config /etc/csh.cshrc
%config /etc/csh.login
%config /etc/inputrc
%config /etc/insserv.conf
%config /etc/mailcap
%config /etc/mime.types
%config /etc/permissions
%config /etc/permissions.easy
%config /etc/permissions.local
%config /etc/permissions.paranoid
%config /etc/permissions.secure
%config /etc/profile
%config /etc/profile.d/alias.ash
%config /etc/profile.d/alljava.csh
@ -31,23 +24,16 @@
%config /etc/profile.d/profile.sh
%config /etc/profile.d/sh.ssh
%config /etc/profile.d/sh.utf8
%config /etc/profile.d/xdg-enviroment.csh
%config /etc/profile.d/xdg-enviroment.sh
%config /etc/profile.d/xdg-environment.csh
%config /etc/profile.d/xdg-environment.sh
%config /etc/rc.splash
%config /etc/rc.status
%config /etc/runlevel.fallback
%config /etc/shells
%config /etc/ttytype
%config /etc/zshrc
%config /etc/init.d/boot
%config /etc/init.d/boot.setup
%config /etc/init.d/dummy
%config /etc/init.d/halt
%config /etc/init.d/network
%config /etc/init.d/powerfail
%config /etc/init.d/random
%config /etc/init.d/route
%config /etc/init.d/routed
%config /etc/init.d/serial
%config /etc/init.d/single
%config /sbin/quick_halt
%ghost /var/adm/fillup-templates/passwd.aaa_base