Skip to content

Commit

Permalink
Merge pull request sonic-net#2 from githedgehog/dev_base_img_202111_D…
Browse files Browse the repository at this point in the history
…EV-225_features_are_enabled_in_the_build_radius

Enable RADIUS flag
  • Loading branch information
nazar-garmadiy authored and Maksym Hedeon committed Feb 1, 2023
1 parent 8e4942e commit 0097520
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/audisp-tacplus_*.deb || \
sudo LANG=C chroot $FILESYSTEM_ROOT pam-auth-update --remove tacplus
sudo sed -i -e '/^passwd/s/ tacplus//' $FILESYSTEM_ROOT/etc/nsswitch.conf

{% if include_radius == "y" %}
# Install pam-radius-auth and nss-radius
sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/libpam-radius-auth_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
Expand All @@ -289,6 +290,7 @@ sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/libnss-radius_*.deb || \
# radius does not have any profiles
#sudo LANG=C chroot $FILESYSTEM_ROOT pam-auth-update --remove radius tacplus
sudo sed -i -e '/^passwd/s/ radius//' $FILESYSTEM_ROOT/etc/nsswitch.conf
{% endif %}

# Install a custom version of kdump-tools (and its dependencies via 'apt-get -y install -f')
if [[ $CONFIGURED_ARCH == amd64 ]]; then
Expand Down
3 changes: 3 additions & 0 deletions rules/config
Original file line number Diff line number Diff line change
Expand Up @@ -222,3 +222,6 @@ INCLUDE_MUX = y

# reset default container registry from dockerhub to other
DEFAULT_CONTAINER_REGISTRY ?=

# INCLUDE_RADIUS - build and install radius package
INCLUDE_RADIUS = y
3 changes: 2 additions & 1 deletion rules/radius.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# libpam-radius-auth packages

ifeq ($(INCLUDE_RADIUS), y)
PAM_RADIUS_VERSION = 1.4.1-1

export PAM_RADIUS_VERSION
Expand All @@ -21,4 +22,4 @@ $(LIBNSS_RADIUS)_SRC_PATH = $(SRC_PATH)/radius/nss
SONIC_MAKE_DEBS += $(LIBNSS_RADIUS)

SONIC_STRETCH_DEBS += $(LIBNSS_RADIUS)

endif
2 changes: 2 additions & 0 deletions slave.mk
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ $(info "INCLUDE_P4RT" : "$(INCLUDE_P4RT)")
$(info "INCLUDE_KUBERNETES" : "$(INCLUDE_KUBERNETES)")
$(info "INCLUDE_MACSEC" : "$(INCLUDE_MACSEC)")
$(info "INCLUDE_MUX" : "$(INCLUDE_MUX)")
$(info "INCLUDE_RADIUS" : "$(INCLUDE_RADIUS)")
$(info "TELEMETRY_WRITABLE" : "$(TELEMETRY_WRITABLE)")
$(info "ENABLE_AUTO_TECH_SUPPORT" : "$(ENABLE_AUTO_TECH_SUPPORT)")
$(info "PDDF_SUPPORT" : "$(PDDF_SUPPORT)")
Expand Down Expand Up @@ -1029,6 +1030,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
export include_nat="$(INCLUDE_NAT)"
export include_p4rt="$(INCLUDE_P4RT)"
export include_sflow="$(INCLUDE_SFLOW)"
export include_radius="$(INCLUDE_RADIUS)"
export enable_auto_tech_support="$(ENABLE_AUTO_TECH_SUPPORT)"
export include_macsec="$(INCLUDE_MACSEC)"
export include_mgmt_framework="$(INCLUDE_MGMT_FRAMEWORK)"
Expand Down

0 comments on commit 0097520

Please sign in to comment.