Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re6stnet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joanne Hugé
re6stnet
Commits
e5d9c4b1
Commit
e5d9c4b1
authored
Dec 28, 2015
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpm: better systemd integration
- Suse wants units in /usr/lib/systemd/system - respect system-preset
parent
4c2284e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
Makefile
Makefile
+2
-1
re6stnet.spec
re6stnet.spec
+7
-7
No files found.
Makefile
View file @
e5d9c4b1
DESTDIR
=
/
DESTDIR
=
/
PREFIX
=
/usr/local
PREFIX
=
/usr/local
MANDIR
=
$(PREFIX)
/share/man
MANDIR
=
$(PREFIX)
/share/man
UNITDIR
=
/lib/systemd/system
MANPAGELIST
:=
$(
patsubst
%,docs/%,re6st-conf.1 re6st-registry.1 re6stnet.8
)
MANPAGELIST
:=
$(
patsubst
%,docs/%,re6st-conf.1 re6st-registry.1 re6stnet.8
)
NM
=
/etc/NetworkManager/dispatcher.d/50re6stnet
NM
=
/etc/NetworkManager/dispatcher.d/50re6stnet
...
@@ -12,7 +13,7 @@ all: $(MANPAGELIST)
...
@@ -12,7 +13,7 @@ all: $(MANPAGELIST)
install
:
install-noinit
install
:
install-noinit
for
x
in
daemon/
*
.service
;
\
for
x
in
daemon/
*
.service
;
\
do
install
-Dpm
0644
$$
x
$(DESTDIR)
/lib/systemd/system
/
$
${
x
##*/
}
;
\
do
install
-Dpm
0644
$$
x
$(DESTDIR)
$(UNITDIR)
/
$
${
x
##*/
}
;
\
done
done
install-noinit
:
install-man
install-noinit
:
install-man
...
...
re6stnet.spec
View file @
e5d9c4b1
%define _builddir %(pwd)
%define _builddir %(pwd)
%define ver %(python re6st/version.py)
%define ver %(python re6st/version.py)
%define units re6stnet.service re6st-registry.service
Summary: resilient, scalable, IPv6 network application
Summary: resilient, scalable, IPv6 network application
Name: re6stnet
Name: re6stnet
...
@@ -25,7 +26,7 @@ make
...
@@ -25,7 +26,7 @@ make
%install
%install
set $RPM_BUILD_ROOT
set $RPM_BUILD_ROOT
make install PREFIX=%_prefix MANDIR=%_mandir DESTDIR=$1
make install PREFIX=%_prefix MANDIR=%_mandir DESTDIR=$1
%{?_unitdir:UNITDIR=%{_unitdir}}
# Exclude man pages because they will be compressed.
# Exclude man pages because they will be compressed.
find $1 -mindepth 1 -path \*%_mandir -prune -o \
find $1 -mindepth 1 -path \*%_mandir -prune -o \
-name re6st\* -prune -printf /%%P\\n > INSTALLED
-name re6st\* -prune -printf /%%P\\n > INSTALLED
...
@@ -39,18 +40,17 @@ rm -rf "$RPM_BUILD_ROOT" INSTALLED
...
@@ -39,18 +40,17 @@ rm -rf "$RPM_BUILD_ROOT" INSTALLED
%post
%post
if [ $1 -eq 1 ]; then
if [ $1 -eq 1 ]; then
/bin/systemctl
enable re6stnet.service re6st-registry.service
|| :
/bin/systemctl
preset %{units}
|| :
fi >/dev/null 2>&1
fi >/dev/null 2>&1
%preun
%preun
if [ $1 -eq 0 ]; then
if [ $1 -eq 0 ]; then
/bin/systemctl --no-reload disable
re6stnet.service re6st-registry.service
|| :
/bin/systemctl --no-reload disable
%{units}
|| :
/bin/systemctl stop
re6stnet.service re6st-registry.service
|| :
/bin/systemctl stop
%{units}
|| :
fi >/dev/null 2>&1
fi >/dev/null 2>&1
%postun
%postun
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
if [ $1 -ge 1 ]; then
# only try to restart the registry (doing same for re6stnet could be troublesome)
/bin/systemctl try-restart %{units} >/dev/null 2>&1 || :
/bin/systemctl try-restart re6st-registry.service >/dev/null 2>&1 || :
fi
fi
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