forked from FRRouting/frr
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
alpine packaging: use a more standard packaging format
Currently, we just package the frr daemons, but we don't run them. This is fine for basic tests, but it is inconvenient to orchestrate the daemons from downstream test environments. Here, we follow the redhat and debianpkg formats more closely, putting the daemons in /usr/lib/frr and including the frr user and groups in the package. We also include a docker specific startup script and a sysvinit link in /etc/init.d/frr for openrc based alpine installs. Testing done: Built packages, built base images, everything seems to work fine. Uninstalled the package, all the daemons stopped. Issue: FRRouting#2030 Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
- Loading branch information
1 parent
8227cf9
commit 915c81b
Showing
8 changed files
with
88 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
## | ||
# For volume mounts... | ||
## | ||
chown -R frr:frr /etc/frr | ||
/etc/init.d/frr start | ||
exec sleep 10000d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
getent passwd frr > /dev/null && deluser frr | ||
getent group frrvty > /dev/null && delgroup frrvty | ||
getent group frr > /dev/null && delgroup frr | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
/etc/init.d/frr stop | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
for g in frr frrvty; do | ||
! getent group $g > /dev/null && addgroup -S $g | ||
done | ||
|
||
! getent passwd frr > /dev/null && \ | ||
adduser -S -D -h /var/run/frr -s /sbin/nologin -G frr -g frr frr | ||
|
||
adduser frr frrvty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters