# Remove old init.d
if ! [ "$CROSS_INSTALL" = "on" ] ; then
if  [  !  -e  /etc/init.d/smgl_init  ]  ;  then
  touch /tmp/initd_first_install

  mkdir  -p  /etc/init.d.backup

  mv  /etc/init.d  /etc/init.d.backup

  for  l  in  0 1 2 3 4 5 6 S  ;  do
    [  -d  /etc/rc$l.d  ]  &&  mv  /etc/rc$l.d  /etc/init.d.backup
  done
fi
fi

# remove left behind file, bug #5784.
if [ -f /etc/init.d/runlevels/%3/z-misc.sh ]; then
  rm /etc/init.d/runlevels/%3/z-misc.sh
fi

true
