Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sonic-utilities/scripts] Fixing FP ports issue #268

Merged
merged 1 commit into from
Jun 15, 2018
Merged
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
11 changes: 10 additions & 1 deletion scripts/reboot
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#! /bin/bash

# Check root privileges
if [[ "$EUID" -ne 0 ]]
then
echo "Please run as root" >&2
exit 1
fi

function stop_sonic_services()
{
echo "Stopping syncd..."
Expand All @@ -13,8 +20,10 @@ PLATFORM=`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`
DEVPATH="/usr/share/sonic/device"
REBOOT="platform_reboot"

# Stop syncd gracefully.
stop_sonic_services

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