sonic-buildimage/platform/broadcom/sonic-platform-modules-ingrasys/debian/sonic-platform-ingrasys-s9200-64x.postinst

44 lines
2.0 KiB
Plaintext
Raw Normal View History

# Automatically added by dh_systemd_enable
# This will only remove masks created by d-s-h on package removal.
deb-systemd-helper unmask s9200-64x-monitor.service >/dev/null || true
deb-systemd-helper unmask qsfp-monitor.service >/dev/null || true
# Generate kernel modules.dep and map files for add eeprom_mb.
depmod -a || true
# was-enabled defaults to true, so new installations run enable.
if deb-systemd-helper --quiet was-enabled s9200-64x-monitor.service; then
# Enables the unit on first installation, creates new
# symlinks on upgrades if the unit file has changed.
deb-systemd-helper enable s9200-64x-monitor.service >/dev/null || true
else
# Update the statefile to add new symlinks (if any), which need to be
# cleaned up on purge. Also remove old symlinks.
deb-systemd-helper update-state s9200-64x-monitor.service >/dev/null || true
fi
if deb-systemd-helper --quiet was-enabled qsfp-monitor.service; then
# Enables the unit on first installation, creates new
# symlinks on upgrades if the unit file has changed.
deb-systemd-helper enable qsfp-monitor.service >/dev/null || true
else
# Update the statefile to add new symlinks (if any), which need to be
# cleaned up on purge. Also remove old symlinks.
deb-systemd-helper update-state qsfp-monitor.service >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_installinit
if [ -x "/etc/init.d/s9200-64x-monitor" ]; then
update-rc.d s9200-64x-monitor defaults >/dev/null
invoke-rc.d s9200-64x-monitor start || exit $?
fi
if [ -x "/etc/init.d/qsfp-monitor" ]; then
update-rc.d qsfp-monitor defaults >/dev/null
invoke-rc.d qsfp-monitor start || exit $?
fi
# End automatically added section
# Automatically added by dh_systemd_start
if [ -d /run/systemd/system ]; then
systemctl --system daemon-reload >/dev/null || true
deb-systemd-invoke start s9200-64x-monitor.service >/dev/null || true
deb-systemd-invoke start qsfp-monitor.service >/dev/null || true
fi
# End automatically added section