-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MultiDB]: install default db config file when installing swsscommon …
…lib if there is no one (#321)
- Loading branch information
1 parent
eb01b68
commit 29a2cdf
Showing
4 changed files
with
71 additions
and
1 deletion.
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,57 @@ | ||
{ | ||
"INSTANCES": { | ||
"redis":{ | ||
"hostname" : "127.0.0.1", | ||
"port" : 6379, | ||
"unix_socket_path" : "/var/run/redis/redis.sock" | ||
} | ||
}, | ||
"DATABASES" : { | ||
"APPL_DB" : { | ||
"id" : 0, | ||
"separator": ":", | ||
"instance" : "redis" | ||
}, | ||
"ASIC_DB" : { | ||
"id" : 1, | ||
"separator": ":", | ||
"instance" : "redis" | ||
}, | ||
"COUNTERS_DB" : { | ||
"id" : 2, | ||
"separator": ":", | ||
"instance" : "redis" | ||
}, | ||
"LOGLEVEL_DB" : { | ||
"id" : 3, | ||
"separator": ":", | ||
"instance" : "redis" | ||
}, | ||
"CONFIG_DB" : { | ||
"id" : 4, | ||
"separator": "|", | ||
"instance" : "redis" | ||
}, | ||
"PFC_WD_DB" : { | ||
"id" : 5, | ||
"separator": ":", | ||
"instance" : "redis" | ||
}, | ||
"FLEX_COUNTER_DB" : { | ||
"id" : 5, | ||
"separator": ":", | ||
"instance" : "redis" | ||
}, | ||
"STATE_DB" : { | ||
"id" : 6, | ||
"separator": "|", | ||
"instance" : "redis" | ||
}, | ||
"SNMP_OVERLAY_DB" : { | ||
"id" : 7, | ||
"separator": "|", | ||
"instance" : "redis" | ||
} | ||
}, | ||
"VERSION" : "1.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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
usr/lib/*/lib*.so.* | ||
usr/share/swss/*.lua | ||
usr/share/swss/*.json | ||
usr/bin/swssloglevel |
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,11 @@ | ||
#!/bin/bash | ||
# This `DEBIAN/postinst` script is run post-installation | ||
DST_PATH="/var/run/redis/sonic-db" | ||
DST_FILE="database_config.json" | ||
SRC_PATH="/usr/share/swss" | ||
|
||
# if there is no $DST_FILE, it is needed to copy one default to $DST_FILE | ||
if [ ! -e $DST_PATH/$DST_FILE ]; then | ||
mkdir -p $DST_PATH | ||
cp $SRC_PATH/$DST_FILE $DST_PATH/$DST_FILE | ||
fi |