Junos
Junos

"[: -eq: unexpected operator" <-- in console after updating OS

‎05-01-2014 03:53 PM

I was using Junos 10.4R3-export however after updating OS to 11.4R10.3 I have strange "[: -eq: unexpected operator" message in the terminal. Is this known issue? Or is it just me?

 

 

RDM Embedded 7 [04-Aug-2006] http://www.birdstep.com
Copyright (c) 1992-2006 Birdstep Technology, Inc.  All Rights Reserved.

Unix Domain sockets Lock manager
Lock manager 'lockmgr' started successfully.
Error: Profile database dictionary file missing.
Profile database initialized
Local package initialization:.
starting local daemons:set cores for group access
.
kern.securelevel: -1 -> 1
[: -eq: unexpected operator <---------------------------- HERE IT IS???
Thu May  1 22:42:33 UTC 2014

Amnesiac (ttyd0)

login: root

--- JUNOS 11.4R10.3 built 2013-11-15 06:44:36 UTC
root@%
root@%

9 REPLIES 9
Junos

Re: "[: -eq: unexpected operator" <-- in console after updating OS

‎05-02-2014 04:55 AM

Hello,

 

During boot up, Junos does initialize all libraries and perform sanity checks of configuraiton.

If there are any issues in present configuration or loading up of a library, you would get this error meesage.

 

Did you use no-validate switch while upgrading the OS?

In my experience you should not see this message again.

If you happen to see then any of the configuration parameter(from 10.4) might not be applicable in 11.4.

 

Note: If you see this error in every reboot, you could open up a case with JTAC.

 

Regards,

Raveen

Note: If this answers your question, you could mark this post as accepted solution, that way it helps others as well. Kudos will be cool if I earned it!
Junos

Re: "[: -eq: unexpected operator" <-- in console after updating OS

‎05-02-2014 05:48 AM

Raveen thank you for your reply.

 

No I didnt use no-validate switch. 

Shuld I try with with "no-validate"?

 

Cheers

 

Ranko

 

Junos

Re: "[: -eq: unexpected operator" <-- in console after updating OS

‎05-02-2014 06:01 AM

Alright, then it makes sense, you should have got this message because of not using no-validate switch.

Yes, you could use no-validate switch while upgrading OS.

 

Regards,

Raveen

Note: If this answers your question, you could mark this post as accepted solution, that way it helps others as well. Kudos will be cool if I earned it!
Junos

Re: "[: -eq: unexpected operator" <-- in console after updating OS

‎05-02-2014 06:38 AM

Perfect!

I will try today with "no-validate"

 

Cheers,

 

Ranko

 

Junos

Re: "[: -eq: unexpected operator" <-- in console after updating OS

‎05-02-2014 12:51 PM

 

Nope. "no-validate" option did not help.

 

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

Unix Domain sockets Lock manager
Lock manager 'lockmgr' started successfully.
Error: Profile database dictionary file missing.
Profile database initialized
Local package initialization:.
starting local daemons:set cores for group access
.
kern.securelevel: -1 -> 1
[: -eq: unexpected operator  <-------------------------------------- Here it is again!
Fri May 2 19:52:34 UTC 2014

Amnesiac (ttyd0)

login:

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

 

Cheers,

 

Ranko

 

 

Junos

Re: "[: -eq: unexpected operator" <-- in console after updating OS

‎05-02-2014 02:17 PM

It's a bug (typo) in an underlying shell script that is executed when the system is coming online.  Has nothing to do with the upgrade process itself.  You can safely ignore it.

 

There is equivalent error message tracked under PR 955028:  "[: emerson: unexpected operator".  Not sure what all platforms it affects.  That PR is for 12.3R2+ but it doesn't surprise me that there is a similar sort of error in 11.4.  There may be a different PR to track it in 11.4, I'm not sure.

 

-Chad

Junos

Re: "[: -eq: unexpected operator" <-- in console after updating OS

‎05-02-2014 05:00 PM

I have solution for this:

 

First I installed the Junos system using "Install media CF1024  Version 10.4R3.4" by using dd.

Then I performed update step by step.. that is:

 

10.4R4.5 ---- 10.4R5.5 ---- 10.4R6.5 ---- 10.4R7.5 ---- 10.4R8.6 ---- 10.4R9.2 ---- 10.4R11.5.....etc.. and finally 10.4R16.3

 

Insted "request system software add no-copy no-validate unlink SOURCE" i did "request system software add SOURCE". I dont know if this made any difference but this is what I did. 

 

Now "-eq" bash artefact is gone...

 

Unix Domain sockets Lock manager
Lock manager 'lockmgr' started successfully.
Error: Profile database dictionary file missing.
Profile database initialized
Local package initialization:.
starting local daemons:.
kern.securelevel: -1 -> 1
Fri May 2 23:47:34 UTC 2014

 

PERFECT!

 

Now I will use dd and create backup image just in case.

 

Once again, thank you for your help!

 

Cheers,

 

Ranko

 

 

Junos

Re: "[: -eq: unexpected operator" <-- in console after updating OS

‎05-02-2014 05:03 PM

Chad thank you for your reply. 

Looks like I have solution for this strange bash error. 

 

At this point I am not sure what was the issue but you are right.

 

Cheers,

 

Ranko

 

Junos

Re: "[: -eq: unexpected operator" <-- in console after updating OS

‎05-03-2014 02:49 PM

Just FYI,

 

This problem "[: -eq: unexpected operator" is still present in 12.1 and 11.4.

For how I will use 10.4 but I dont think this error message is a big deal.

 

Cheers,

 

Ranko