- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- set_parms date_time error
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2003 06:13 AM
10-14-2003 06:13 AM
set_parms date_time error
using set_parms date_time to set the date of the month to either 8 or 9. All other days
of the month work and I get the prompt to
enter the hour of the day.
Thanks,
-Nivesh
_______________________________________________________________________________
You will be prompted for the date and time. Please enter all values
numerically, for example January is 1. The values in the parentheses
give the acceptable range of responses.
_______________________________________________________________________________
Please enter the last two digits of the year (00-99), then press [Return] 03
Please enter the month (1-12), then press [Return] 10
Please enter the date of the month (1-31), then press [Return] 8
/sbin/set_parms.d/12_date_time[55]: 08: The specified number is not valid for th
is command.
#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2003 06:22 AM
10-14-2003 06:22 AM
Re: set_parms date_time error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2003 06:29 AM
10-14-2003 06:29 AM
Re: set_parms date_time error
I checked the function that gets called when
running set_parms from a CUI session.
Here is the excerpt:
########################################################
#
# This function actually prompts the user for the time/date info.
#
time_set()
{
# Define date/time variables as 2 digits, right justified, leading zero filled.
typeset -Z2 century year month day hour minute
This is why, when the variable day gets read,
it left pads the 8 with a zero.
The error occurs when the following piece of
code executes:
# Read the day
while :
do
echo "\nPlease enter the date of the month (1-31), then press [Return] \c
"
read day
if (( day > 0 )) && check_day
then
break
else
Retry "Day number out of range for the month.\n"
fi
done
Right where it does "if (( day > 0 )) && check_day" is when the error occurs. I even tried one condition at a time, and both the
conditions generated the error.
Strange, the error happens for only the number 8 and 9 as the date of the month.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2003 06:35 AM
10-14-2003 06:35 AM
Re: set_parms date_time error
with single leading zeroes as octal and that is why 08 and 09 are failing. They are invalid octal values. I've seen this sort of problem before. Look for cumulative shell patches.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2003 04:57 PM
10-14-2003 04:57 PM
Re: set_parms date_time error
http://www2.itrc.hp.com/service/cki/patchDocDisplay.do?patchId=PHCO_22957
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2003 07:31 PM
10-14-2003 07:31 PM
Re: set_parms date_time error
your system has apparently installed patch PHCO_26789.
The description for this patch says, among other things:
"...This patch also fixes the POSIX shell to adhere to ISOC standards by recognizing octal and hexa decimal notations ."
which means that a number starting with zero will be recognized as an octal number; hence the problem with illegal octal numbers as 8 and 9. It suggests a workaround but only for one particular script.
I have tried to search for an anti-PHCO_26789 patch, but without luck; perhaps other people have more success.
If the alternatives are to either uninstall the patch or use a non-posix shell, I think it would be a good idea to ask HP directly.
If you do that, please tell us about the result.
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2003 02:36 AM
10-15-2003 02:36 AM
Re: set_parms date_time error
code for set_parms and /sbin/set_parms.d/12_date_time so that the single
digit date would be read as input, and
the left padding of zero would be performed
after the date checked out okay. This fix had to be done in two places, for the Xserver related functions and the straight terminal functions. That worked! Dates of 8 and 9 were accepted without any errors.
Then I reverted to the original HP versions
of set_parms and dependent scripts, and then uninstalled PHCO_23744 which had come off
the Quality Pack bundle for 11.00, March 2003.
That still left me with /sbin/sh from PHCO_23744 instead of the one from PHCO_18447
which it should have reverted to. Cannot
simply clobber /sbin/sh ofcourse!
So I installed PHCO_20816 because I didn't
want to encounter the eval aborts with syntax
errors introduced in PHCO_22537 and PHCO_23873.
set_parms date_time now works fabulously with
the POSIX shell that came off PHCO_20816.
Problem fixed. Thank you all for your input.
-Nivesh