Skip to content

Commit dea6f20

Browse files
kcudniklguohan
authored andcommitted
Add vssyncd debian package (sonic-net#228)
* Add vssyncd debian package * Address comments * Address comments * Fix control file conflicts field
1 parent 9ce76e7 commit dea6f20

File tree

4 files changed

+44
-0
lines changed

4 files changed

+44
-0
lines changed

debian/control

+6
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ Description: This package contains sync daemon with rpc for SONiC project.
1818
This sync daemon syncs the ASIC_DB in Redis database and the real ASIC via SAI.
1919
This daemon contains saithrift rpc library for remote control of an ASIC.
2020

21+
Package: vssyncd
22+
Architecture: any
23+
Conflicts: syncd-rpc, syncd
24+
Description: This package contains sync daemon for SONiC project linked with virtual switch.
25+
This sync daemon syncs the ASIC_DB in Redis database and the real ASIC via SAI.
26+
2127
Package: libsairedis
2228
Architecture: any
2329
Section: libs

debian/vssyncd.dirs

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
usr/bin

debian/vssyncd.init

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
### BEGIN INIT INFO
4+
# Provides: vssyncd
5+
# Required-Start:
6+
# Required-Stop:
7+
# Default-Start: S
8+
# Default-Stop: 0 6
9+
# Short-Description: SONiC vssync daemon
10+
# Description: Enable service vssyncd.
11+
### END INIT INFO
12+
13+
# Source the file that holds common code for systemd and supervisord
14+
. /usr/bin/syncd_init_common.sh
15+
16+
# When starting as a service, we want our process to run as a daemon, in the background
17+
if [ $CMD == $CMD_DSSERVE ]; then
18+
CMD_ARGS="-d $CMD_ARGS"
19+
fi
20+
21+
case "$1" in
22+
start)
23+
config_syncd
24+
start-stop-daemon --start --quiet --exec $CMD -- $CMD_ARGS
25+
;;
26+
stop)
27+
start-stop-daemon --stop --quiet --exec $CMD
28+
;;
29+
*)
30+
echo "Usage: service syncd {start|stop}"
31+
exit 1
32+
;;
33+
esac
34+
35+
exit 0
36+

debian/vssyncd.install

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
usr/bin/vssyncd usr/bin/syncd

0 commit comments

Comments
 (0)