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

Revert the feature: serial port watchdog service #1766

Merged
merged 2 commits into from
Jun 5, 2018
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
5 changes: 0 additions & 5 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,6 @@ sudo cp $IMAGE_CONFIGS/hostname/hostname-config.service $FILESYSTEM_ROOT/etc/sy
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable hostname-config.service
sudo cp $IMAGE_CONFIGS/hostname/hostname-config.sh $FILESYSTEM_ROOT/usr/bin/

# Copy serial-port-watchdog configuration scripts
sudo cp $IMAGE_CONFIGS/serial-port-watchdog/serial-port-watchdog.service $FILESYSTEM_ROOT/etc/systemd/system/
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable serial-port-watchdog.service
sudo cp $IMAGE_CONFIGS/serial-port-watchdog/serial-port-watchdog.py $FILESYSTEM_ROOT/usr/bin/

# Copy updategraph script and service file
sudo cp $IMAGE_CONFIGS/updategraph/updategraph.service $FILESYSTEM_ROOT/etc/systemd/system/
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable updategraph.service
Expand Down
44 changes: 4 additions & 40 deletions files/image_config/platform/rc.local
Original file line number Diff line number Diff line change
Expand Up @@ -183,51 +183,15 @@ for x in "$@"; do
done
}

setup_platform()
{
eval sonic_version=$(cat /etc/sonic/sonic_version.yml | grep build_version | cut -f2 -d" ")

if [ -f /host/image-$sonic_version/platform/firsttime ]; then

if [ -n "$aboot_platform" ]; then
platform=$aboot_platform
elif [ -n "$onie_platform" ]; then
platform=$onie_platform
else
platform=''
fi
}

# Setup default values in this function before reading installer.conf
# installer.conf could override the value set in this function.
setup_platform_defaults()
{
# Default serial port: ttyS0
CONSOLE_DEV=0
}

load_platform_installer_config()
{
INSTALLER_CFG=/usr/share/sonic/device/$platform/installer.conf
if [ -f $INSTALLER_CFG ]; then
. $INSTALLER_CFG
fi
}

program_serial_port()
{
sed -i "s|ttyS.|ttyS$CONSOLE_DEV|g" /etc/systemd/system/serial-port-watchdog.service
systemctl daemon-reload
systemctl restart serial-port-watchdog.service
}

eval sonic_version=$(cat /etc/sonic/sonic_version.yml | grep build_version | cut -f2 -d" ")

setup_platform
setup_platform_defaults
load_platform_installer_config

program_serial_port

if [ -f /host/image-$sonic_version/platform/firsttime ]; then

if [ -z "$platform" ]; then
echo "Unknown sonic platform"
firsttime_exit
fi
Expand Down
328 changes: 0 additions & 328 deletions files/image_config/serial-port-watchdog/serial-port-watchdog.py

This file was deleted.

Loading