Skip to content

Commit

Permalink
moved the kdump change specific stream edit command from "sed -i "m b…
Browse files Browse the repository at this point in the history
…uild_debian.sh to sonic_debian_extension.j2
  • Loading branch information
bilal-ismail committed May 7, 2024
1 parent 2a6fe4c commit fea28ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 0 additions & 5 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -453,11 +453,6 @@ sudo cp files/image_config/kdump/vmcore-sysctl.conf $FILESYSTEM_ROOT/etc/sysctl.
sudo cp files/scripts/network-interface-state-init.sh $FILESYSTEM_ROOT/usr/sbin/network-interface-state-init.sh
sudo chmod +x $FILESYSTEM_ROOT/usr/sbin/network-interface-state-init.sh

# Edit the kdump-tools package script to call a custom one, which shall enable ethernet interfaces in the crash kernel environment
sudo sed -i "/PATH=\/bin:\/usr\/bin:\/sbin:\/usr\/sbin/a NET_INTERFACE_INIT=/usr/sbin/network-interface-state-init.sh" $FILESYSTEM_ROOT/usr/sbin/kdump-config
sudo sed -i "/Network not reachable/a . $NET_INTERFACE_INIT" $FILESYSTEM_ROOT/usr/sbin/kdump-config


#Adds a locale to a debian system in non-interactive mode
sudo sed -i '/^#.* en_US.* /s/^#//' $FILESYSTEM_ROOT/etc/locale.gen && \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT locale-gen "en_US.UTF-8"
Expand Down
6 changes: 6 additions & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -1005,3 +1005,9 @@ sudo rm -rf $FILESYSTEM_ROOT/tmp/mask_disabled_services.py


sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install python3-dbus


# Edit the kdump-tools package script to call a custom one, which shall enable ethernet interfaces in the crash kernel environment
sudo sed -i "/PATH=\/bin:\/usr\/bin:\/sbin:\/usr\/sbin/a NET_INTERFACE_INIT=/usr/sbin/network-interface-state-init.sh" $FILESYSTEM_ROOT/usr/sbin/kdump-config
sudo sed -i "/Network not reachable/a . $NET_INTERFACE_INIT" $FILESYSTEM_ROOT/usr/sbin/kdump-config

0 comments on commit fea28ec

Please sign in to comment.