Back to home
All Tips: (Newest at top)

Tip: increase init.d script performance very slightly

scripts in /etc/init.d are called by rcS - another shell script.

If they end in .sh, they are sourced. Otherwise, they are forked.

So, in other words, add .sh to the end of any shell-script init.d scripts for a slight performance boost.

I'm lazy and don't get around to updating tip-of-the-wekk more than twice in a few months.. is there a problem with that?

You boot up your poly-p-ux system... but oh no, the network cable is unplugged! Or wait.. the server that you need to log into because it is broken is your network's dhcp server!

Basically, udhcpc by default will loop forever waiting for a lease.

Add "-n" to the options for udhcpc in your init.d script or wherever it is, and if it doesn't get a lease immediately, it will give up.

So you start up a microcom session, and you want to quit. Uh-oh, microcom is so micro that there's no way to exit! No problem, just switch to another virtual terminal, and go to kill it.

Oh, but you forgot... you left another command doing stuff on the other terminal - and I didn't realize until too late (also as a measure to save resources on older machines) that there are only three terminals in poly-p-ux, one of which is just reading off your syslog.

So, lets allocate some more terminals for you to login at.

First thing's first, figure out how many you want. If you want to go all-out, and have the memory to handle it, you can use the seemingly standard amount - tty1-6 as logins, 7 reserved for x-windows, and 12 used for syslog (except, you'll have to mknod tty12...). Of course, I only have 12mb of ram (Which can do it, but I don't want to push into swap yet...), so I'll only have 4 login terminals, but 6 will get my syslog.

  1. Open up /etc/inittab in vi (your favorite editor :D)
  2. Find the section "Logging Junk"
  3. Change the tty3 to the terminal you want the logs on. I chose tty6.
  4. Go back up to the "Set up a couple of getty's" section
  5. Copy the lines until you have enough, setting the tty to the next incremental tty as you go.
  6. :w and :q
  7. Reboot, and enjoy your new login terminals!