Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1583938
 поиск   регистрация   авторизация 
 
Группа :: Система/Основа
Пакет: startup

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

Name: startup
Version: 0.9.1
Release: alt1.M24.1

Summary: The system startup scripts
License: GPL
Group: System/Base
Packager: Dmitry V. Levin <ldv at altlinux.org>
BuildArch: noarch

Source: %name-%version.tar.bz2

Patch1: %name-rc.sysinit.patch
Patch2: %name-halt.patch

Provides: /etc/firsttime.d
PreReq: service >= 0.0.2-alt1, chkconfig, gawk, grep, sed, coreutils, %__subst
# Who could remind me where these dependencies came from?
Requires: findutils >= 0:4.0.33, modutils >= 0:2.4.12-alt4, mount >= 0:2.10q-ipl1mdk
Requires: procps >= 0:2.0.7-ipl5mdk, psmisc >= 0:19-ipl2mdk, util-linux >= 0:2.10q-ipl1mdk
# due to /sys
Requires: filesystem >= 0:2.1.7-alt1
# due to %_sysconfdir/adjtime
Requires: hwclock >= 2.23-alt1

# due to update_wms

Conflicts: xinitrc < 0:2.4.13-alt1
# due to gen_kernel_headers
Conflicts: kernel-headers-common < 0:1.1

%description
This package contains scripts used to boot your system,
change runlevels, and shut the system down cleanly.

%prep
%setup -q
%patch1
%patch2

%install
%__mkdir_p %buildroot%_sysconfdir/rc.d/rc{0,1,2,3,4,5,6}.d
%__install -p -m644 inittab modules sysctl.conf %buildroot%_sysconfdir/
%__install -pD -m755 setsysfont %buildroot/sbin/setsysfont
%__cp -a rc.d sysconfig %buildroot%_sysconfdir/

# these services do not support chkconfig:

# killall, halt, single local - Can't store symlinks in a CVS archive
%__ln_s ../init.d/killall %buildroot%_sysconfdir/rc.d/rc0.d/S00killall
%__ln_s ../init.d/killall %buildroot%_sysconfdir/rc.d/rc6.d/S00killall

%__ln_s ../init.d/halt %buildroot%_sysconfdir/rc.d/rc0.d/S01halt
%__ln_s ../init.d/halt %buildroot%_sysconfdir/rc.d/rc6.d/S01reboot

%__ln_s ../init.d/single %buildroot%_sysconfdir/rc.d/rc1.d/S00single

for i in `seq 2 5`; do
%__ln_s ../init.d/local %buildroot%_sysconfdir/rc.d/rc$i.d/S99local
done

%__mkdir_p %buildroot%_var/{log,run}
touch %buildroot%_var/{log/wtmp,run/utmp}
touch %buildroot%_sysconfdir/sysconfig/{clock,i18n,keyboard,mouse,system}
%__chmod -R +x %buildroot%_sysconfdir/rc.d
%__mkdir_p %buildroot%_sysconfdir/sysconfig/{console,harddisk}
touch %buildroot%_sysconfdir/sysconfig/console/setterm

%__mkdir_p %buildroot%_sysconfdir/firsttime.d
%__mkdir_p %buildroot%_localstatedir/rsbac

%post
if [ $1 -eq 1 ]; then
/sbin/chkconfig --add fbsetfont
/sbin/chkconfig --add random
/sbin/chkconfig --add rawdevices
fi

for f in /var/{log/wtmp,run/utmp}; do
if [ ! -f "$f" ]; then
:>>"$f"
%__chown root.utmp "$f"
%__chmod 664 "$f"
fi
done

# Dup of timeconfig %%post - here to avoid a dependency.

if [ -L %_sysconfdir/localtime ]; then
_FNAME=`/bin/ls -ld %_sysconfdir/localtime |/bin/awk '{print $11}' |/bin/sed 's/lib/share/'`
if [ -f "$_FNAME" ]; then
%__rm %_sysconfdir/localtime
%__cp -fp "$_FNAME" %_sysconfdir/localtime
if ! %__grep -q "^ZONE=" %_sysconfdir/sysconfig/clock; then
echo "ZONE=\"$_FNAME"\" |/bin/sed -e "s|[^\"]*/usr/share/zoneinfo/||" >>%_sysconfdir/sysconfig/clock
fi
fi
fi

if %__grep -qs '^fb:[0-9]*:once:/etc/rc.d/scripts/framebuffer_setfont' /etc/inittab; then
/sbin/chkconfig --add fbsetfont
%__subst 's,^\(fb:[0-9]*:once:/etc/rc.d/scripts/framebuffer_setfont\),#\1,' /etc/inittab
fi

%preun
if [ $1 -eq 0 ]; then
/sbin/chkconfig --del fbsetfont
/sbin/chkconfig --del random
/sbin/chkconfig --del rawdevices
fi

%triggerpostun -- initscripts < 1:5.49.1-alt1
for f in %_sysconfdir/{inittab,modules,sysctl.conf,sysconfig/{clock,console/setterm,framebuffer,i18n,init,keyboard,mouse,rawdevices,system}}; do
if [ ! -f "$f" ]; then
       if [ -f "$f".rpmsave ]; then
               %__cp -pf "$f".rpmsave "$f"
       elif [ -f "$f".rpmnew ]; then
               %__cp -pf "$f".rpmnew "$f"
       fi
fi
done
/sbin/chkconfig --add fbsetfont
/sbin/chkconfig --add random
/sbin/chkconfig --add rawdevices

%triggerpostun -- startup < 0:0.2-alt1
/sbin/chkconfig --add fbsetfont

%files
%config(noreplace) %verify(not md5 mtime size) %_sysconfdir/sysconfig/*
%config(noreplace) %_sysconfdir/inittab
%config(noreplace) %_sysconfdir/modules
%config(noreplace) %_sysconfdir/sysctl.conf
%config(missingok) %_sysconfdir/rc.d/rc?.d/*
%dir    %_sysconfdir/rc.d/scripts
%config %_sysconfdir/rc.d/scripts/*
%config %_sysconfdir/rc.d/init.d/*
%config %_sysconfdir/rc.d/rc
%config %_sysconfdir/rc.d/rc.sysinit
%config %_sysconfdir/rc.d/rc.powerfail
/sbin/setsysfont
%ghost %attr(664,root,utmp) /var/log/wtmp
%ghost %attr(664,root,utmp) /var/run/utmp
%dir %_sysconfdir/firsttime.d
%dir %_localstatedir/rsbac

%changelog

Полный changelog можно просмотреть здесь

 
design & coding: Vladimir Lettiev aka crux © 2004-2005