Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ SONIC_BUILD_INSTRUCTION := make \
SONIC_ENABLE_SYSTEM_TELEMETRY=$(ENABLE_SYSTEM_TELEMETRY) \
SONIC_ENABLE_RESTAPI=$(ENABLE_RESTAPI) \
EXTRA_JESSIE_TARGETS=$(EXTRA_JESSIE_TARGETS) \
TELEMETRY_READONLY=$(TELEMETRY_READONLY) \
$(SONIC_OVERRIDE_BUILD_VARS)

.PHONY: sonic-slave-build sonic-slave-bash init reset
Expand Down
5 changes: 5 additions & 0 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,11 @@ if [ -f sonic_debian_extension.sh ]; then
./sonic_debian_extension.sh $FILESYSTEM_ROOT $PLATFORM_DIR
fi

## Enable read-only mode for telemetry if TELEMETRY_READONLY is set
if [ "${TELEMETRY_READONLY}" = "y" ]; then
sudo touch $FILESYSTEM_ROOT/etc/sonic/telemetry_readonly
fi

## Organization specific extensions such as Configuration & Scripts for features like AAA, ZTP...
if [ "${enable_organization_extensions}" = "y" ]; then
if [ -f files/build_templates/organization_extensions.sh ]; then
Expand Down
2 changes: 2 additions & 0 deletions slave.mk
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ $(info "BLDENV" : "$(BLDENV)")
$(info "VS_PREPARE_MEM" : "$(VS_PREPARE_MEM)")
$(info "ENABLE_SFLOW" : "$(ENABLE_SFLOW)")
$(info "ENABLE_NAT" : "$(ENABLE_NAT)")
$(info "TELEMETRY_READONLY" : "$(TELEMETRY_READONLY)")
$(info )

ifeq ($(SONIC_USE_DOCKER_BUILDKIT),y)
Expand Down Expand Up @@ -726,6 +727,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
DEBUG_SRC_ARCHIVE_FILE="$(DBG_SRC_ARCHIVE_FILE)" \
USERNAME="$(USERNAME)" \
PASSWORD="$(PASSWORD)" \
TELEMETRY_READONLY="$(TELEMETRY_READONLY)" \
./build_debian.sh $(LOG)

USERNAME="$(USERNAME)" \
Expand Down