Operating System - HP-UX
1835245 Members
2225 Online
110078 Solutions
New Discussion

HP-UX 11.00 dodisk script sintax error

 
Davide Depaoli_4
Occasional Contributor

HP-UX 11.00 dodisk script sintax error

Hello,
I've configured and started system accountig. When launch dodisk script, it
fails because a sintax error on a bracket "(".

When launch the script with "ksh -k" this error message appears:

*********
Usage: awk [-F fs][-v Assignment][-f Progfile|Program][Assignment|File]
*********

Anyone know where is the error into the script?

Thanks in advance
Regards
Davide
7 REPLIES 7
Atif Malik_2
Frequent Advisor

Re: HP-UX 11.00 dodisk script sintax error

The error message is printed because awk script in the dodisk(1M) does not
handle commented line by '#' in the /etc/fstab. To fix it, simply remove the
comments in the /etc/fstab file.
Harjit Gill
Occasional Advisor

Re: HP-UX 11.00 dodisk script sintax error

Patch PHCO_24869 will fix this problem for HP-UX 11.20, not sure if there is a patch for 11.00.
You can also get around this problem by deleting all the comment lines, lines starting with '#', from /etc/fstab.
Trust Only HP (Higher Power)
Mark Grant
Honored Contributor

Re: HP-UX 11.00 dodisk script sintax error

The trouble here is that "dodisk" generates part of the script itself. Could you post the contents of /var/tmp/awk.tmp.* if they still exist.
Never preceed any demonstration with anything more predictive than "watch this"
T G Manikandan
Honored Contributor

Re: HP-UX 11.00 dodisk script sintax error

Jeroen Peereboom
Honored Contributor

Re: HP-UX 11.00 dodisk script sintax error

Davide,

the only thing I found is form april 2000:

http://www5.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000065950660

Dodisk processes /etc/fstab, so this file must be well formatted.

HTH,

JP.
Jeroen Peereboom
Honored Contributor

Re: HP-UX 11.00 dodisk script sintax error

Weird,

I see that there are 5 replies, but when I select this page I only see the question?

JP.
marc seguin
Regular Advisor

Re: HP-UX 11.00 dodisk script sintax error

The error comes from the line "# See fstab(4) and sam(1M) for further details on configuring devices." which is not well treated by the awk script in dodisk.

You can modify the dodisk script :
replace "if (access(diskusg))" [line 64 on HP 11.11]
by "if (access(diskusg)==1)"

But there is another bug. This script shouldn't look for commented lines but it does it. And, as a result, if you comment out a line in the middle of /etc/fstab, you can't get the diskusage for file systems under this line.

So, instead of the correction above, it is better to do this one :
After the line
"\$3 !~ /swap/ \" [line 51 on HP 11.11]
you can add :
"&& \$1 !~ /^#/ \"

That's all.