0.1-alt1
- Initial release
This commit is contained in:
commit
a63aa6bde3
3
.gear-rules
Normal file
3
.gear-rules
Normal file
@ -0,0 +1,3 @@
|
||||
tar: alterator-net-common
|
||||
|
||||
|
34
alterator-net-common.spec
Normal file
34
alterator-net-common.spec
Normal file
@ -0,0 +1,34 @@
|
||||
%define _altdata_dir %_datadir/alterator
|
||||
|
||||
Name: alterator-net-common
|
||||
Version: 0.1
|
||||
Release: alt1
|
||||
|
||||
Packager: Stanislav Ievlev <inger@altlinux.org>
|
||||
|
||||
Requires: etcnet
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
Source: %name-%version.tar
|
||||
|
||||
Summary: helpers for etcnet administration
|
||||
License: GPL
|
||||
Group: System/Base
|
||||
Requires: openssl
|
||||
|
||||
%description
|
||||
helpers for etcnet administration
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%install
|
||||
%makeinstall
|
||||
|
||||
%files
|
||||
%_libexecdir/%name/
|
||||
|
||||
%changelog
|
||||
* Thu Jul 19 2007 Stanislav Ievlev <inger@altlinux.org> 0.1-alt1
|
||||
- Initial release
|
6
alterator-net-common/Makefile
Normal file
6
alterator-net-common/Makefile
Normal file
@ -0,0 +1,6 @@
|
||||
TOOLS=ifup ifdown ifvar iflist ifcheckup ifcheckplug
|
||||
INSTALL=/usr/bin/install
|
||||
|
||||
install:
|
||||
$(INSTALL) -d $(libexecdir)/alterator-net-common/
|
||||
$(INSTALL) -pm755 $(TOOLS) $(libexecdir)/alterator-net-common/
|
3
alterator-net-common/ifcheckplug
Executable file
3
alterator-net-common/ifcheckplug
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
/usr/sbin/ifplugstatus "$1" >/dev/null 2>/dev/null
|
3
alterator-net-common/ifcheckup
Executable file
3
alterator-net-common/ifcheckup
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
/sbin/ip -o link show dev "$1" 2>/dev/null |cut -d' ' -f3 |grep -qs -- '[<,]UP[,>]'
|
3
alterator-net-common/ifdown
Executable file
3
alterator-net-common/ifdown
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
env -i PATH="$PATH" HOME="$HOME" TMPDIR="$TMPDIR" /sbin/ifup "$1" >/dev/null
|
4
alterator-net-common/iflist
Executable file
4
alterator-net-common/iflist
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
/sbin/ip -o a l|
|
||||
sed -nre 's|^[0-9]+: ([^:]+): [^/]* link/ether ([a-f0-9:]+).*|\1 \2|p'
|
3
alterator-net-common/ifup
Executable file
3
alterator-net-common/ifup
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
env -i PATH="$PATH" HOME="$HOME" TMPDIR="$TMPDIR" /sbin/ifup "$1" >/dev/null
|
25
alterator-net-common/ifvar
Executable file
25
alterator-net-common/ifvar
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
NAME="$1" && shift
|
||||
VAR="$1" && shift
|
||||
|
||||
unset $VAR
|
||||
|
||||
. "${SCRIPTDIR:=/etc/net/scripts}/functions"
|
||||
pickup_defaults
|
||||
if [ -d "$IFACEDIR/$NAME@$NETHOST" ]; then
|
||||
MYIFACEDIR="$IFACEDIR/$NAME@$NETHOST"
|
||||
else
|
||||
MYIFACEDIR="$IFACEDIR/$NAME"
|
||||
fi
|
||||
|
||||
[ -d "$MYIFACEDIR" ] || {
|
||||
print_error "interface configuration directory '$MYIFACEDIR' not found"
|
||||
exit 1
|
||||
}
|
||||
export MYIFACEDIR NETPROFILE
|
||||
|
||||
init_netprofile
|
||||
pickup_options
|
||||
|
||||
eval "echo \"\$$VAR\""
|
Loading…
Reference in New Issue
Block a user