#!/bin/sh

################################################################################
#
# Copyright (C) 2016 Cumulus Networks Inc. All rights reserved
#
################################################################################

# post-remove script for onie-tools

# bail out on any errors
set -e

command="$1"
old_version="$2"

# Only perform actions for "remove"
if [ "$command" = "remove" ] ; then
    # Update the grub.cfg as we have removed
    # /usr/lib/cumulus/onie/onie-tools-common, needed by
    # /etc/grub.d/50_onie_grub.
    #
    # Note: The "remove" operation will leave /etc/grub.d/50_onie_grub
    # behind.  That file is only removed by the "purge" operation.
    update-grub
fi

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#
