Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions scripts/fast-reboot
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ sync
sleep 1
sync

# Reboot
# Reboot: explicity call Linux native reboot under sbin
echo "Rebooting to $NEXT_SONIC_IMAGE..."
reboot
/sbin/reboot
28 changes: 28 additions & 0 deletions scripts/reboot
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#! /bin/bash

function stop_sonic_services()
{
echo "Stopping sonic services..."
systemctl stop swss
systemctl stop teamd
systemctl stop bgp
systemctl stop lldp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why only four dockers?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

snmp docker?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added stop snmp service to the list.

Thanks,
Ying

systemctl stop snmp
}

# Obtain our platform as we will mount directories with these names in each docker
PLATFORM=`sonic-cfggen -v platform`

DEVPATH="/usr/share/sonic/device"
REBOOT="platform_reboot"

if [ -x ${DEVPATH}/${PLATFORM}/${REBOOT} ]; then
stop_sonic_services
sync
sleep 3
echo "Rebooting with platform ${PLATFORM} specific tool ..."
${DEVPATH}/${PLATFORM}/${REBOOT}
exit 0
fi

/sbin/reboot $@
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def get_test_suite():
'scripts/port2alias',
'scripts/portconfig',
'scripts/portstat',
'scripts/reboot',
'scripts/teamshow'
],
data_files=[
Expand Down