Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37810240
en ru br
ALT Linux repos
5.0: 0.5.6-alt1
4.1: 0.5.6-alt1
4.0: 0.5.6-alt1
3.0: 0.5.5-alt1

Group :: System/Base
RPM: net-scripts

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Name: net-scripts
Version: 0.5.5
Release: alt1
Summary: The system network scripts
Summary(ru_RU.KOI8-R): Системные сценарии для управления сетью
License: GPL
Group: System/Base
Packager: Denis Ovsienko <pilot at altlinux.ru>
Source: %name-%version.tar.bz2
Patch0: ppp-watch-nohang.patch
PreReq: setup >= 0:2.1.9-ipl18mdk, service, startup >= 0:0.9.3-alt1, chkconfig, control
Requires: iproute2
Conflicts: initscripts < 1:5.49.1-alt1, ppp-common < 0:0.3
Conflicts: ppp < 0:2.3.9, wvdial < 0:1.40
BuildRequires: glib-devel libpopt-devel
Provides: network-config-subsystem

%description
This package contains the basic system scripts that activate
and deactivate most network interfaces.

%description -l ru_RU.KOI8-R
Этот пакет содержит базовые системные сценарии, которые
активируют и деактивируют большинство сетевых интерфейсов.

%prep
%setup -q
%patch0

%build
make -C src

%install
%make_install install -C src DESTDIR=$RPM_BUILD_ROOT

%__mkdir_p $RPM_BUILD_ROOT%_sysconfdir
%__cp -a rc.d sysconfig $RPM_BUILD_ROOT%_sysconfdir/
for n in ifup ifdown; do
%__mv $RPM_BUILD_ROOT%_sysconfdir/sysconfig/network-scripts/$n \
$RPM_BUILD_ROOT/sbin/
%__ln_s /sbin/$n \
$RPM_BUILD_ROOT%_sysconfdir/sysconfig/network-scripts/
done

touch $RPM_BUILD_ROOT%_sysconfdir/sysconfig/network
chmod -R +x $RPM_BUILD_ROOT{/sbin,%_sysconfdir/{rc.d,sysconfig/network-scripts}}
%__ln_s %_docdir/%name-%version/README $RPM_BUILD_ROOT%_sysconfdir/sysconfig/network-scripts/

%__mkdir_p $RPM_BUILD_ROOT/var/{log,run/netreport}

%pre
if [ $1 -ge 2 ]; then
/usr/sbin/control-dump usernetctl
fi

%post
if [ $1 -ge 2 ]; then
/usr/sbin/control-restore usernetctl
else
/sbin/chkconfig --add network
fi

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

%triggerpostun -- initscripts < 1:5.49.1-alt1
for f in %_sysconfdir/sysconfig/{network,vlan}; 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 network

%files
%config(noreplace) %verify(not md5 mtime size) %_sysconfdir/sysconfig/network
%config(noreplace) %verify(not md5 mtime size) %_sysconfdir/sysconfig/vlan
%config %_sysconfdir/rc.d/init.d/*
%config /etc/control.d/facilities/usernetctl
# TODO: those two can produce 2 dead links in sbin
%config /sbin/ifup
%config /sbin/ifdown
%dir %_sysconfdir/sysconfig/network-scripts
%config %_sysconfdir/sysconfig/network-scripts/ifcfg-*
%config %_sysconfdir/sysconfig/network-scripts/sysctl.conf
%_sysconfdir/sysconfig/network-scripts/ifdown*
%_sysconfdir/sysconfig/network-scripts/ifup*
%_sysconfdir/sysconfig/network-scripts/network-functions*
%doc %_sysconfdir/sysconfig/network-scripts/README

/bin/*
/sbin/ppp-watch
%attr(2711,root,netwatch) /sbin/netreport
%attr(700,root,root) %_sbindir/usernetctl
%dir %attr(730,root,netwatch) /var/run/netreport
%_mandir/man?/*

%doc README ifcfg-iptun0.example ifcfg-plip0.example ifcfg-ipsectun0.example
%doc ifcfg-pentanet0.example config-pentanet0.example

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin