On Startup

Is it possible to mount devices automatically on startup? Much like autoexec.bat in DOS. Currently, I need to mount the floppy disk drive and assign the multi serial ports after boot. The command used are as followed :

mount /dev/fd0 /fs/floppy
devc-ser8250 3f8,4 2f8,3 300, 11 308, 10

It would be great if there’s a similiar command in C for the devc-ser8250. Please advice, thank you.

You could put those commands in the /etc/rc.d/rc.local file, that’s run on startup.

You can edit the same in /root/.ph/phapps file for these functionalities to be implemented at start up.

Thanks. Unfortunately, I don’t have either of the files in my system. Do I have to create it myself?

Yes you do, Make sure you set the executable bit on them (chmod +x …)

NEVER put system command in .phapps. Big mistake, since that is run everytime you log in, not when Photon starts. They go in rc.local.