[freeside] Problem with BEGIN statement in fs-setup

Louis Erickson loki at rdwarf.com
Fri Oct 26 01:38:09 PDT 2001


On Thu, 25 Oct 2001, ivan wrote:

> On Thu, Oct 25, 2001 at 12:31:53AM -0700, Louis Erickson wrote:
> >
> > DBD is DBD::InterBase version 1.24.
> > Yes, I realize I'm asking for a world of hurt by using a strange
> > database, but that's something I think I can cope with, and I like
> > InterBase.  I don't think it's causing the problem, either.
>
> You'll probably need to add support for InterBase to DBIx::DBSchema
> <http://www.420.am/dbix-dbschema/>.  I don't know how well the default
> support will cope with InterBase.  Driver writer's guide is at
> <http://www.420.am/dbix-dbschema/DBIx/DBSchema/DBD.html>.

Thank you for the pointer.  The package seems to be very well done, and a
good and laudable idea.  Unfourtenately, I couldn't figure out a clean way
to get the information needed from InterBase that I felt worth the effort.
You'd have to write an XSUB and link with the InterBase library, and I
punted on it and used mySQL.  (Dynamic SQL from Interbase has no "SHOW
TABLE" command.  You could run isql, and parse the output, or link to the
C libraries.  Both are possible.  I decided neither was worth the effort.)

> > The problem I have that I can't work around is while trying to run
> > fs-setup.  I get the following error, and I don't know why.
> >
> > Running fs-setup produces:
> >
> > ./fs-setup: line 140: syntax error near unexpected token `}'
> > ./fs-setup: line 140: `BEGIN { $FS::Record::setup_hack = 1; }'
>
> For some reason, you're trying to run fs-setup with your shell.  Look:
>
> ivan at rootwood:~/freeside-1.3.1/bin$ bash fs-setup
> fs-setup: line 140: syntax error near unexpected token `}'
> fs-setup: line 140: `BEGIN { $FS::Record::setup_hack = 1; }'
>
> Perhaps you typed `. fs-setup' when you meant `./fs-setup'

Yes, that seems to have been the problem.  I had done ./fs-setup.  I
randomly tried using "su freeside -" to get a login shell as the freeside
user, which fixed the problem.

A couple of other little hiccups (suidperl, permissions, easy stuff), and
I have freeside up and running.  Yay!

I have a couple of questions about operation, though.

As I understand it, you create SERVICES which describe the details of what
is available to customers.  You then create PACKAGES which contain one or
more services.  You sell packages to people.  So far, so good.

I'm trying to go through the list of things I offer, and translate them in
to items which freeside can manage.  I'm not certain how to describe some
of them.

When you define a service, there are four tables, svc_acct, svc_domain,
svc_acct_sm, and svc_www... these seem to be the sorts of services which
you can make available.  That's accounts, hosted domains, something about
email for hosted domains, and something about web pages.

I'm not certain I understand what the four types are for and how they are
best used.  Is there some documentation I am missing, or could you shed
some light on what the four different types are for?

Is there a way to add one-off items to an account?  I want to be able to
charge users for extra disc space, if they run over their quota, on a
month-by-month basis, and in blocks of disc.  And, can I add or remove
items from external programs?  I just noticed the Perl API, which may
have the information I need for that.

My list of states for new customers dosen't have California in it.
Where'd it go?  =)

I've noticed the web pages don't always refersh; they must not have
no-cache in the header.  I expect everybody's mentioned that, though.

I'm quite impressed with the package, by the way.  It's quite capable,
looks as if it can be expanded to control many interesting devices and
services, and distributed to multiple machines.  It seems to work very
well, and is pretty well documented.  Thank you for undertaking this work,
and for sharing it with the rest of us.

-- 
Louis Erickson - loki at rdwarf.com - http://www.rdwarf.com/~wwonko/

New Year's Eve is the time of year when a man most feels his age, and
his wife most often reminds him to act it.
		-- Webster's Unafraid Dictionary




More information about the freeside-users mailing list