Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
aports
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
678
Issues
678
List
Boards
Labels
Service Desk
Milestones
Merge Requests
158
Merge Requests
158
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
aports
Commits
e25b90eb
Commit
e25b90eb
authored
Sep 18, 2016
by
Kaarle Ritvanen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing/static-routing: new package
parent
3ca28703
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
testing/static-routing/APKBUILD
testing/static-routing/APKBUILD
+25
-0
testing/static-routing/static-routing
testing/static-routing/static-routing
+27
-0
No files found.
testing/static-routing/APKBUILD
0 → 100644
View file @
e25b90eb
# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
# Maintainer:
pkgname
=
static-routing
pkgver
=
0.1
pkgrel
=
0
pkgdesc
=
"Script for configuring static routing"
url
=
http://git.alpinelinux.org/cgit/aports/tree/testing/static-routing
arch
=
noarch
license
=
GPL-2
depends
=
source
=
static-routing
build
()
{
:
}
package
()
{
install
-D
-m
755
"
$srcdir
/static-routing"
"
$pkgdir
/etc/network/if-up.d/static-routing"
install
-d
-m
755
"
$pkgdir
/etc/network/if-down.d"
ln
-s
../if-up.d/static-routing
"
$pkgdir
/etc/network/if-down.d"
}
md5sums
=
"4cf33f3ace8112f7817caf83158ae66f static-routing"
sha256sums
=
"9070f883e73453573e27fc9b6a689f70c0ca5f5d3f7296d27add0d9f3930c6bb static-routing"
sha512sums
=
"89ace46345ee43961ca38c67d841d598c38f5c6765317b8353e360d761ea31f128c656095632b20eeedf683e4ae4337c5d177422779491e9bb027289e82a34a8 static-routing"
testing/static-routing/static-routing
0 → 100644
View file @
e25b90eb
#!/bin/sh
# Static routing configuration script
# Copyright (c) 2016 Kaarle Ritvanen
if
[
$MODE
=
start
]
;
then
ACTION
=
add
elif
[
$MODE
=
stop
]
;
then
ACTION
=
del
else
exit
1
fi
configure
()
{
local
class
=
$1
shift
local
entry
IFS
=
,
for
entry
in
$(
eval
"echo
\"\$
IF_
$(
echo
$class
|
tr
a-z A-Z
)
\"
"
)
;
do
IFS
=
" "
ip
$class
$ACTION
$entry
$*
done
}
configure route src
$IF_ADDRESS
dev
$IFACE
configure rule
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment