Operating System - HP-UX
1833325 Members
3024 Online
110051 Solutions
New Discussion

Re: White spaces in inittab

 
Namit
Advisor

White spaces in inittab

I've got this question from a friend, and I have no idea why and how this would happen ...

-------------

If we have an entry in /etc/inittab (HP-UX 11i ) with some extra white spaces in between, then while putting the entry in inittab( or probabaly during init q or restart/modification of the inittab entry) ,ARE the extra white spaces removed sometimes.

If I put the following entry in inittab:
fvmd:234:respawn:/bin/sh -c "/opt/nortel/applications/FVM02/view_manager/fvmd/fvmd.exk >/dev/null" # View management daemon

Then sometimes the extra spaces between >/dev/null and # View management daemon are removed & the entry looks like this:
fvmd:234:respawn:/bin/sh -c "/opt/nortel/applications/FVM02/view_manager/fvmd/fvmd.exk >/dev/null" # View management daemon

Is it a normal unix feature to chop off the extra white spaces sometimes, if yes then what are the possible reasons/time why/when inittab behaves like this.

Live and let die
4 REPLIES 4
Michael Tully
Honored Contributor

Re: White spaces in inittab

This type of thing can happen to any file if there has been a copy and paste done from a windows based system. I've seen it happen where the unix session window is a certain size and the copy and paste over a line has been larger than a single line will permit in the window.
Anyone for a Mutiny ?
Sridhar Bhaskarla
Honored Contributor

Re: White spaces in inittab

Hi,

init command only reads entries from inittab. It does not recreate or refresh the inittab. Neither any other commands would modify the inittab.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Namit
Advisor

Re: White spaces in inittab

The fellow definitely doesn't know when the white spaces are removed ... obviously 'init q' can't remove the white spaces, but the question is, "when and how would the white spaces be removed ?"

I would want to say that the spaces are not removed at all, but he says that he had some spaces between ">/dev/null" and "# View management" and those spaces are now removed.

My doubt is that the application that registers this particular entry in inittab might have rewritten this entry for some reason.
Live and let die
Frank Slootweg
Honored Contributor

Re: White spaces in inittab

Let him do a "ll /etc/inittab" before and after the "init q" and when the file has changed. Perhaps the timestamps can identify some event which has changed the file.

Note: Normally /etc/inittab is read-only, so it can only be changed by 'force'.