sonic-buildimage/platform/broadcom/sonic-platform-modules-ingrasys/debian/sonic-platform-ingrasys-s8900-64xc.postinst

43 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 s8900-64xc-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 s8900-64xc-monitor.service; then
# Enables the unit on first installation, creates new
# symlinks on upgrades if the unit file has changed.
deb-systemd-helper enable s8900-64xc-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 s8900-64xc-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/s8900-64xc-monitor" ]; then
update-rc.d s8900-64xc-monitor defaults >/dev/null
invoke-rc.d s8900-64xc-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 s8900-64xc-monitor.service >/dev/null || true
deb-systemd-invoke start qsfp-monitor.service >/dev/null || true
fi
# End automatically added section