LinHES Forums
http://forum.linhes.org/

6.03 Upgrade Script Problem
http://forum.linhes.org/viewtopic.php?f=22&t=21227
Page 1 of 1

Author:  sparks [ Wed Jul 14, 2010 2:17 pm ]
Post subject:  6.03 Upgrade Script Problem

I decided it was time to upgrade from 6.01 to 6.03. I used the command posted on mysettopbox.tv which is 'sudo pacman -Sy linhes-scripts'. When I ran it i got '/usr/LH/bin/remove_php_mythvideo.sh: line 4: [: !=: unary operator expected'. This is from the .INSTALL file in the script package. I suppose I could just try to fix the script but

1) it may mean a big load of modifications down the whole line
2) it may mean something is awry in my LinHES 6.01 installation

I figure I must be doing something wrong if the automated upgrade fails for me.

In /etc/systemconfig the line is SystemType=""
Running the script with vx options shows

+ '[' '!=' Frontend_only ']'
./phpremove.sh: line 4: [: !=: unary operator expected

What upgrade advice does the community have?
Thanks

sparks

Author:  tjc [ Thu Jul 15, 2010 5:51 pm ]
Post subject: 

Looks like missing double quotes around a variable expansion.If line 4 looks something this:
Code:
[ $foo != Frontend_only ] &&

or maybe:
Code:
if [ $foo != Frontend_only ] then

Then make it look like this:
Code:
[ "$foo" != Frontend_only ] &&

With the variable expansion properly quoted. This is probably the single most common shell scripting bugs ever.

Author:  sparks [ Fri Jul 16, 2010 10:53 am ]
Post subject: 

That is exactly the problem. My point was why does this upgrade script work for everybody else and not me. As it turned out I populated the value of SystemType with "StandAlone". The way it was, the shell variable was being assigned a value of null and... down the road to common error. Evidently SystemType is supposed to be populated by a setup screen under LinHES Configuration. I just did it manually after using the setup screen caused untold grief for reasons unknown after a new systemconfig was generated. Restored from backup and started over.

After updating the the /etc/systemconfig I tried upgrading again. This time it went very smoothly. But, as so often happens, I just traded old problems for new problems. Now I cannot get into the Video Library. Watch Recordings and Listen to Music work fine. The DB has the correct path, the drive is mounted, and the folder is not empty. ~sigh~

I have used Knoppix for years and now LinHES. I really like it but the seeming lack of dox is frustrating. Fortunately I know my way around linux fairly well so I can almost always eventually figurre out my problem.

Is /etc/systemconfig a LinHES thing and not a MythTV thing?

Thanks out to Cecil and all his helpers.

-s-

Author:  tjc [ Sat Jul 17, 2010 8:36 am ]
Post subject: 

Well /etc/sysconfig/ (yes, I realize that's different) is a common Linux thing (both the Fedora box and the KnoppMyth box have it), and the R5.5 box doesn't have /etc/systemconfig so I'd guess it's a LinHES thing, possibly from Arch or MythVantage.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/