APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed
RSS Feeds RSS Feeds











(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version
->
-> Counterpoint on Red Hat Linux


Counterpoint on Red Hat Linux



Counterpoint (Counterpoint web site) is a provider of point of sale and accounting software. Recently, they have provided Linux versions of their software. I've done three installations of this in recent months, and this article details my experiences.


Workstation or Server?

The installation notes for Linux warn that Counterpoint must be installed on a "Workstation" install of Red Hat. This isn't really true, and probably would cause a person new to Linux more trouble than they could handle.

The problem, I'm sure, is that Red Hat offers several different "Server" installations, and each includes different configurations of software. I have no idea just what is missing that causes problems for Counterpoint, but the solution is simple: do an "Everything" install. The disk requirements aren't much, and you don't have to think about what you might need later- just throw it all on and be done with it.

However, if you feel you must follow Counterpoint's dire warnings and do the Workstation install, you'll probably need a few additional packages. The Workstation install does not, for example, include the telnetd server- which means no inbound telnet connections. If you have multiple users on a network, you'll need to at least add that from the RPM's: mount the Red Hat install CD and install the "telnet-server" package from the RedHat/RPMS directory (note that each CD has PART of the RPMS- so if what you want isn't on CD 1 it may be on CD 2 etc.). While you are there, you might also want to install the Samba packages- the Workstation install does not completely install Samba either. I can't even remember all the things I needed that are not installed on Workstation- it can get pretty annoying constantly going back to install more RPMS, and probably the biggest annoyance is figuring out what you need- packages aren't always so obviously named as "telnet-server". Still, if you needed support from Counterpoint, they are going to ask if you installed Workstation or Server, and you had better not have the wrong answer. If you are the faint-hearted type, you might want to do it their way and put up with the pain.

Did Someone say Pain?

There's no shortage of pain or at least minor difficulty with these Linux installs. For example, one of the things I'm accustomed to doing is modifying the users .profile to do an "exec" of the application. Well, "exec" is just a little bit broken on the bash version supplied with some versions of Red Hat. If you use it, you'll probably find that your application program doesn't work at all, and that certainly was the case with Counterpoint. For the moment, I just changed the .profiles to do a "cd /syn; ./syn; exit 0". That's not equivalent to an exec, but it was the best I could do while I went looking for a fix.

Red Hat Network

Before working with the customer's machines, I figured I'd see if the problem existed on my own, fully installed, machine. Indeed it did, so it was now time to get updates from Red Hat.

With recent versions of Red Hat, you have to register before you can use their Update Agent (Programs->System->Update Agent). The idea is that they will let you have free updates for one machine, but if you are maintaing multiple machines, you'll have to subscribe for a fee. I have no problem with that, but even after registering I couldn't get the Update Agent to work- it would always hang at "Romoving packages with files marked to skip from list". Fortunately, "up2date" (which is the program that actually does the updates) also runs in command line mode- running it there I found that it was crashing because it couldn't open /etc/ntp-step-tickers. I simply did "touch /etc/ntp/step-tickers" and then up2date retrieved information about 163 packages it said I needed to update.

Well, that's a bit of a mess, isn't it? 450 MB of updates? I have a fast internet connection, but that's a little much, so I thought maybe I could pick and choose what I really needed. As "up2date" itself was on the list, I thought that would be a good place to start, so I checked it off and proceeded. The update manager warned me that dependencies required certain other packages, and offered to retrieve those also, and I told it to go ahead, but when it came time to install, it failed miserably, complaining that dependencies were not resolved.

Well, nothing to do but bite the bullet and get everything. That immediately is an annoyance itself- there's no apparent way to just say "get everything"- you have to check off everything individually- very annoying. Once that's done, the downloaad proceeds, and after it is done, the packages are installed. That takes a bit longer than the download on my machine (fast internet, pokey old hardware). This time everything installed without error, but the exec still wasn't working right.

Later, after delivering the customer's machines, I decided to experiment with a newer bash. I didn't want to put it on the customer's boxes if it hadn't been blessed by RedHat, but I did want to investigate the problem. So, I went to www.rpmfind.net, and a quick search for bash there turned up a later version. I downloaded 2.05.4(1) bash, did an "rpm -U", and the exec problem was fixed.

Printing

Well, of course there were more problems. Printing was the first, and this was puzzling. Synchronics handles spooled printers in the same way the RealWorld Unix systems do: an environment variable containing the print command is exported before running the application. This is usually done by putting the variables in the "synsuppl" file in the working application directory. Here's a "synsuppl" with a few printers defined:

# have to copy the SYNLINUX.MAP from the Counterpoint CD
# if you want to run this from the console.
[ $TERM = linux ] && loadkeys SYNLINUX.MAP
TERM=ansi
dd_printer=">lpr -P lp"; export dd_printer
dd_forms=">lpr -P forms"; export dd_printer
 

In the Printer Groups setup within Synchronics, you'd use "printer" and "forms" where you'd otherwise specify a device. On SCO Unix installations, this works as it should, but it didn't work on Linux. Fortunately, there's a simple work-around:

:
# script to create a device file for Synchronics to use with a spooled printer
# start this from /etc/rc2.d/S99local
rm -f /dev/forms
mknod /dev/forms p
chmod 666 /dev/forms
while true
do
cat /dev/forms | lpr -P forms
done
 

The following information is from Counterpoint:

Important information regarding CounterPoint and Red Hat 7.1 Linux:

CounterPoint is not currently supported on RedHat 7.1.

( Note: More recently, Counterpoint has advised me that they have tested with RedHat 7.2 using the abi module and have no problems- APL)

Previous versions of the Linux kernel included an iBCS module that allowed Unix binaries to run under Linux. RedHat 7.1 ships with the 2.4.2 kernel and iBCS is not available for 2.4.x kernels. Starting with the 2.4.3 kernel, an ABI module is available to allow Unix binaries to run under Linux.

ibcs2 has been deprecated in favor of the ABI kernel patches. See linux-abi.sourceforge.net

The 2.4.2 kernel that ships with RedHat 7.1 is not compatible with iBCS nor ABI. It is our expectation that RedHat will be updating Linux to provide compatibility with Unix binaries; however, this is not the case today. When this happens, Synchronics can support CounterPoint on that compatible version of Linux.

Basic CounterPoint applications run without the Unix binary compatibility (provided either by iBCS or ABI). However, the following functions will not run without binary compatibility:

  • Multi-Site Multi-Site simply can't run. There are a number of functions that require binaries (such as msset.exe, copycf, copycfl, and others)
  • Automatic TEMP directory cleanup

When exiting CounterPoint, you get the message "./syn: ./syndel: cannot execute binary file", which means that if there were any open users, you will eventually get the message "Maximum number of users exceeded". This can be corrected by deleting the contents of the TEMP directory once all users have exited.

If you encounter these problems, you have the following choices:


a) Establish your own method for cleaning up the TEMP directory and don't use Multi-Site, or
b) Move to RedHat 7.0 (make a backup of your CounterPoint programs and data, rebuild the machine using the older version, re-load your backup), or
c) Update from the 2.4.2 kernel to the 2.4.3 kernel for all applicable modules, then obtain the ABI source http://linux-abi.sourceforge.net/ and merge it with the 2.4.3 kernel and recompile and re-install the kernel. Synchronics cannot help you accomplish this or provide support for this updating, and so this is not recommended solution.

I suspect that the defective bash shell may be the source of this problem, too. While you are sticking stuff in S99local, you may as well add a call to "modprobe iBCS"; Synchronics needs that module loaded.

With this printer script, you can just use "/dev/forms" in the Synchronics printer setup. The "forms" printer could be a local printer or a network printer; Synchronics thinks it is printing to a device but the script redirects that to the spooler. On most of the installs I did, the printers were attached to Windows machines and shared. On the Linux side, I configured them with the Print Tool as smb printers. I use the "text only" printer type for dot matrix printers; otherwise you will find Linux using ghostscript to create graphics of your text (that can also be shut off by setting EXPORT ASCII_TO_PS=NO in /var/spool/lpd/printername/general.cfg).

Samba

That, of course, requires Samba. As I said earlier, only part of Samba gets installed with the Workstation option, and you will want to install the rest if you want the Linux machine to be available in network neighborhood. Samba configuration is pretty easy; you'll find the configuration file /etc/samba/smb.conf and it has pretty clear examples. You can also use "Swat", which is the html based configurator. However, installing Samba doesn't enable swat or Samba: enable swat by editing the "swat" file in /etc/xinetd.d, and samba by "ln /etc/init.d/smb /etc/rc2.d/S35smb; /etc/rc2.d/S35smb start". or you can use chkconfig:

chkconfig --level 2345 smb on 
 

The O'Reilly Samba book is a good reference to have.


Because most of the clients I work with are small and more concerned about ease of use than security, I make the Samba configuration use share level security by modifying the smb.conf file like this:

[global]
netbios name=cpserver
workgroup = WORKGROUP
security = share
 

Of course this would not be suitable for larger installations or when the machine is accessible from the outside world. Since small system users so often don't even log in to Windows, I also give them a public share:

[public]
   comment = Public Stuff
   path = /public
   public = yes
   writable = yes

Someone who read this article really took me to task on that, really making it sound like this was almost a criminal act. It's not: small offices want to share data easily and they fully understand that anyone else could delete or otherwise pervert the files stored here. That's not the point- these are small environments of cooperative users. They don't lock their office desks and they want ease of use more than somebody elses idea of a "secure" system.

Win4Lin

I also installed Win4Lin on some of these systems. This lets the server also function as a client, using the same Windows emulation software as the rest of the users and providing an environment that the typical user is more accustomed to.

The only problem I had at all with Win4lin on these RedHat systems was that part of the install wanted libncurses.so.4, and failed until I linked /usr/lib/libncurses.so.5 to that.

Anzio

The specs for these installs called for Anzio on the Windows side. Anzio doesn't quite work right with Counterpoint- it doesn't keep the colors correct as you arrow through the menus (neither does SCO's Termlite, so the problem may actually be Counterpoint though they insist it isn't), but other than that it's fine. I configured Anzio to use SCOANSI emulation, and in the synsuppl file I tell Counterpoint that the TERM is just ansi. In these installs, there wouldn't be anything but SCOANSI or the System console, so I just did a flat "TERM=ansi" in the synsuppl file, but you could also do

[ $TERM = "scoansi" ] && TERM=ansi
 

in a more complex environment.

Root login

I try to keep users away from the root login, but there are of course times when it is necessary. Of course, by the time it becomes necessary, the users will have completely forgotten everything they needed to know, so I set up a simple program (call it /usr/local/bin/remind) that will help them:

echo "
su -     to become root
df       to see disk space
w        to see logged in users
shutdown to shutdown server
resetsyn to reset syn user count
setdate  to change date
"
 

Now how will they remember to use "remind"? Well, one way is to use a PROMPT_COMMAND in .bash_profile:

PROMPT_COMMAND=/usr/local/bin/remind
 

That causes "remind" to run before each shell prompt. You might want to cut that back to something that just reminds them of "remind".

The last two commands mentioned in that script aren't supplied by RedHat or Synchronics. The "resetsyn" clears the Synchronics of false users- it sometimes gets confused and if sessions are hung, this can be run:

w
echo "All users log off and then press ENTER"
read ak
killall -9 rtssyn
cd /syn/TEMP && rm -f *
w
 

The "setdate" is just a more user-friendly front end to changing the date and time:

echo -n "Enter Date or leave blank for `date +%m/%d/%y`: " 
read mydat
echo -n "Enter Time or leave blank for `date +%H:%M`: " 
read mytime
if [ "$mydat" != "" ]
then
mmdd=`echo $mydat | sed 's/\///g;s/..$//'`
yr=`echo $mydat | sed 's/\///g;s/^....//'`
else
mmdd=`date +%m%d`
yr=`date +%y`
fi

if [ "$mytime" != "" ]
then
newtime=`echo $mytime | sed 's/://g'`
else
newtime=`date +%H%M`
fi
date "$mmdd$newtime$yr"

That script also works on SCO and most other Unixes.

There are some other changes I make. Synchronics provides an End Of Day backup which just copies data files to another location on disk. That's useful to have before posting, etc. I modify their script to use cpio instead of cp or copy:

       :
        backup () {

       if [ ! -d EODBACK/$1 ]
       then
          mkdir EODBACK/$1
       fi


       find $1 | cpio -pdmv EODBACK/$1

         }

       cd $1
       if [ ! -d EODBACK ]
       then
          mkdir EODBACK
       fi
       backup IMDATA
       backup ARDATA
       backup SADATA
       backup SYDATA
       backup PSDATA
       cd ..

Microlite Edge

I used the 01.01.08 version of Microlite Edge on all of these. Installing on Linux is easy and the new automatic configuration just steps you through everything very nicely. The only part I don't like is the question "Are you on a network?". That really should be "Can I get the host information for this machine from DNS?" or it should be smart enough to look in/etc/hosts itself. Other than that, and the fact that you need to know to stop and run the Manual Check to get the Locate Threshold, this is a slick, easy install.

Support Modem

It's always good to have a modem for dial-in, even if other methods are available. You can configure the modem with minicom (not installed with Workstation!) after making a link from /dev/ttyS0 (or 1) to /dev/modem. These happened to be Multitech modems, so I configured the DTE rate to 38400 by "AT$SB38400" and set "ATS0=1" for answer on one ring. I then added an "mgetty -D -s 38400" line to inittab like this:

7:2345:respawn:/sbin/mgetty -D -s 38400  /dev/ttyS0
 

The "-D" tells mgetty that this modem isn't going to be used for anything but data, and the -s sets the DTE rate. I could have set the DTE rate higher, but there's no advantage for a support modem and some serial ports sometimes have trouble with the higher speeds(mostly true on older equipment).

Note that mgetty isn't included in a Workstation install either.

Final Thoughts

The nice things about this are the reliability and flexibility combined with low cost hardware. Using Samba and Win4lin makes the Windows folks happy, and using Linux cuts down on support calls. I hope Synchronics continues to offer Linux versions.

Publish your articles, comments, book reviews or opinions here!

Copyright June 2001 A.P. Lawrence. All rights reserved





If this page was useful to you, please help others find it:  





Comments?




More Articles by - Find me on Google+



Click here to add your comments
- no registration needed!


Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar

Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

I am a Kerio reseller. Articles here related to Kerio products reflect my honest opinion, but I do have an obvious interest in selling those products also.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.

pavatar.jpg

This post tagged:

       - Administration
       - Linux
       - Microsoft
       - Unix















My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!


book graphic unix and linux troubleshooting guide



Buy Kerio from a dealer
who knows tech:
I sell and support

Kerio Connect Mail server, Control, Workspace and Operator licenses and subscription renewals



Click and enter your name and phone number to call me about Kerio® products right now (Flash required)