Jump to content

New Installer - Bug Fixes and Reports


Recommended Posts

The current Installer doesn't properly catch if I'm not running as root. It throws the error "./Install.sh: 18: [: Illegal number:" and keeps on going." It's a simple fix. It might be as easy as putting quotes around the 0, but I cut and pasted from one of my own scripts.

 

Here's a fix for line 18 in diff format.

18c18
< if [ "$(id -u)" != "0" ] || [ ! -d "/usr/local" ] || [ ! -f ./RCL.tar ]; then
---
> if [ "$UID" -ne 0 ] || [ ! -d "/usr/local" ] || [ ! -f ./RCL.tar ]; then

This can be duplicated on 64-bit Ubuntu 12.04. (I know it's not supported, but it doesn't take much to accomadate.)

 

The next problem is in lines 45 and 151. It only errored on my on line 151 "./Install.sh: 151: ./Install.sh: /sbin/pidof: not found", but the same issues exists at 151. Basically "pidof" doesn't exist on Ubuntu 12.04 or 14.04. pgrep is a comparable replacement and I believe it is supported by both the Debian and RH types.

 

Also, I noted that the ARCH stuff wasn't accurate, but also not used in the script. Anyway, I fixed that. It would be pretty easy to have an RCL-64.tar and an RCL-32.tar in the same package and rework the script to decompress the proper one according to the architecture report.

 

Attached is a diff of the changes I made to make use of pgrep and the full file with changes. I had to use a txt extension to get them uploaded so you'll need to change those.

 

retroclient-install-fixes.txt

Install.txt

 

Stuff not fixed in my changes:

 

I've also seen another problem on both Ubuntu 12.04 and 14.04 when running "sudo service rcl status". The output includes this error at the end, "19 13:55:10: PmcOpenLocal: Handle 3 closed".

 

I might also note the lack of a "restart" option which is one of my biggest annoyances from the 7.7 client. While you're in there fixing this, perhaps we could get that tidbit also.

 

Hope that's all useful to someone.

  • Like 1
Link to comment
Share on other sites

Some other notes:

  • The client now gets installed in /usr/local/retrospect/.
  • The upgrade installer leaves the old /usr/local/dantz/ directory behind when it puts the /usr/local/retrospect/ directory in place. If you run those scripts you'll still be using the old client, consider deleting it.
  • Running 'pkill retroclient' after the installer may help clear up some defunct processes left behind by the installer.
  • I can't find a clean way to report the client version installed. retrocpl --help lists it, but along with lots of other text. Workaround: ./retrocpl --help|grep version|awk '{ print $4 }'
  • 'retroclient' no longer lists the version in the help output. The help output also seems to be missing the ip binding and the daemon options. man page also doesn't note anything about these options. 

I'm tossing in a few more changes to the script also that I'll pass along here in a little bit if you want to wait on distributing it.

Link to comment
Share on other sites

Here's lots of thoughts tossed into the installer script. It includes the idea of handling both architectures in a single script, breaking out the checks at the beginning of the installer, some code consistency clean up, the pgrep instead of pidof, removing some code that wasn't needed and calling it an upgrade instead of an install when appropriate in at least one place.

 

Do with it as you wish.

Install.txt

Link to comment
Share on other sites

I just found this thread when trying to Google for the weird output I get with the new 9.5 client.

 

Running /usr/local/retrospect/client/rcl status sometimes gives me one of these messages:

PmcOpenLocal: Handle 3 closed
PmcClose: Handle 3 closed

Nothing seems wrong with how it works, I was just wondering what those messages mean. I don't recall seeing them with the 7.7 client.

 

I'm running this on FreeBSD 9.3.

 

I have notes for (really basic) scripts that cleanup the old /usr/local/dantz install in preperation for the new /usr/local/retrospect install. I also have stuff for converting the Linux install (32-bit, only) to work with FreeBSD, and I've made .deb packages (7.7 only, so far) for Debian/Ubuntu.

 

Most of it seems to "just work", other than weird messages seen in the logs or stdout.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...