diff --git a/debian/syncd.init b/debian/syncd.init index 782ead6d7b06..d98113bff56e 100644 --- a/debian/syncd.init +++ b/debian/syncd.init @@ -16,36 +16,39 @@ DAEMON_SYNCD=/usr/bin/syncd DAEMON_DSSERVE=/usr/local/bin/dsserve DAEMON_DSSERVE_ARGS="-d $DAEMON_SYNCD --diag" +if [ -x $DAEMON_DSSERVE ]; then + DAEMON=$DAEMON_DSSERVE + DAEMON_ARGS=$DAEMON_DSSERVE_ARGS +else + DAEMON=$DAEMON_SYNCD +fi + start_bcm() { [ -e /dev/linux-bcm-knet ] || mknod /dev/linux-bcm-knet c 122 0 [ -e /dev/linux-user-bde ] || mknod /dev/linux-user-bde c 126 0 [ -e /dev/linux-kernel-bde ] || mknod /dev/linux-kernel-bde c 127 0 +} - if [ -x $DAEMON_DSSERVE ]; then - DAEMON=$DAEMON_DSSERVE - DAEMON_ARGS=$DAEMON_DSSERVE_ARGS - else - DAEMON=$DAEMON_SYNCD - fi +start_mlnx() +{ + mkdir -p /dev/sxdevs + [ -e /dev/sxdevs/sxcdev ] || mknod /dev/sxdevs/sxcdev c 231 193 } case "$1" in start) - . /etc/machine.conf + [ -r /etc/machine.conf ] && . /etc/machine.conf if [ "$onie_platform" == "x86_64-dell_s6000_s1220-r0" ]; then start_bcm elif [ "$onie_platform" == "x86_64-dell_s6100_c2538-r0" ]; then start_bcm - DAEMON_ARGS+=" -p /etc/syncd.d/dell_s6100.profile -N" - elif [ "$onie_platform" == "x86_64-mlnx_x86-r5.0.1400" ]; then - mkdir -p /dev/sxdevs - [ -e /dev/sxdevs/sxcdev ] || mknod /dev/sxdevs/sxcdev c 231 193 - DAEMON=$DAEMON_SYNCD + elif [ "$onie_platform" == "x86_64-mlnx_x86-r5.0.1400" ]; then + start_mlnx DAEMON_ARGS="-p /etc/syncd.d/mlnx_2700.profile -N" fi