#!/bin/bash

# ExaGrid-specific start-up script for smbd that uses samba-pkgcpu and
# taskset to set CPU affinity

CPULIST=$(samba-pkgcpu)
if [ "$CPULIST" ]
then
   echo "Setting CPU affinity"
   taskset -p -c $CPULIST $$ || exit 1
fi

exec /usr/sbin/smbd "$@"
