Greetings:
rc.d is a directory, /usr/local/etc/rc.d
I would have thought that a kdm.sh file would already be there (i.e. under /usr/local/etc/rc.d)
if you installed kdm from the ports collection (i.e. /usr/ports/x11/kde2). I am assuming that kde2
creates a kde.sh startup script.
Worst case, you could create one (i.e. kdm.sh) , and try adding the following line(s) between dashes in there:
---------------------
#!/bin/sh
sleep 20
/usr/local/bin/kdm
---------------------
The sleep allows the login/init process to settle down before invoking kdm.
Finally, do a chmod +x on kdm.sh (i.e. chmod +x kdm.sh).
Startup scripts under /usr/local/etc/rc.d that end with .sh get picked up and automatically invoked/executed.
Best Wishes.