[docker-sonic-vs] Create /usr/share/sonic/platform symlink (#5268)
Copying platform.json file into an empty /usr/share/sonic/platform directory does not mimic an actual device. A more correct approach is to create a /usr/share/sonic/platform symlink which links to the actual platform directory; this is more like what is done inside SONiC containers. Then, we only need to copy the platform.json file into the actual platform directory; the symlink takes care of the alternative path, and also exposes all the other files in the platform directory.
This commit is contained in:
parent
5c73c0197f
commit
456adc32a9
@ -136,7 +136,6 @@ COPY ["chassis_db.py", "/usr/bin/"]
|
||||
|
||||
COPY ["platform.json", "/usr/share/sonic/device/x86_64-kvm_x86_64-r0/"]
|
||||
COPY ["hwsku.json", "/usr/share/sonic/device/x86_64-kvm_x86_64-r0/Force10-S6000/"]
|
||||
COPY ["platform.json", "/usr/share/sonic/platform/"]
|
||||
|
||||
# Workaround the tcpdump issue
|
||||
RUN mv /usr/sbin/tcpdump /usr/bin/tcpdump
|
||||
|
@ -5,6 +5,7 @@
|
||||
# NOTE: 'PLATFORM' and 'HWSKU' environment variables are set
|
||||
# in the Dockerfile so that they persist for the life of the container
|
||||
|
||||
ln -sf /usr/share/sonic/device/$PLATFORM /usr/share/sonic/platform
|
||||
ln -sf /usr/share/sonic/device/$PLATFORM/$HWSKU /usr/share/sonic/hwsku
|
||||
|
||||
pushd /usr/share/sonic/hwsku
|
||||
|
Loading…
Reference in New Issue
Block a user