Perl removed from base installation

rhoekman

Verified User
Joined
Jan 3, 2004
Messages
250
Location
The Netherlands
If you install 5.1-Release with mininum distribution set Perl is not included in the system. The installer will run because it is a shell script but when it needs to do some assigning of quota it won't work:

All Checks have passed, continuing with install...
eval: /usr/bin/perl: not found
id: mail: no such user
useradd: not found
/usr/local/directadmin/scripts/hostname.sh: cannot create /etc/virtual/domains:
No such file or directory
chown: /usr/local/directadmin/conf/*: No such file or directory
chmod: /usr/local/directadmin/conf/*: No such file or directory
Checking quotas...
./fstab.sh: /usr/bin/perl: not found
./fstab.sh: /usr/bin/perl: not found
quotaoff: 2 not found in fstab

The Early Adopter's Guides points this out:

"Several parts of FreeBSD's base system functionality have been moved to the Ports Collection. Notable examples include Perl, UUCP, and most (but not all) games. While these programs are still supported, their removal from the base system may cause some confusion."

Fix this by installing perl with "pkg_add -r perl5.8"
 
Yea I found all that out when I tried to install today. Been told they will add a check to make sure Perl is installed first in an updated installer version.
 
Yes, I told them last weekend when I ran into it. I wanted to know what was going on, because Perl not being there just started to scare me a little :D

This only effects Minimal installations afaik. I haven't try to install with user binaries and docs for example and see if it gets installed. The Guide claims it will..
 
Last edited:
Assuming that someone might need help installing perl:

type sysinstall at the command prompt and do: Configure -> Packages -> FTP (choose a mirror) -> perl5

or

type cd /usr/ports/lang/perl5.8/
make & make install
 
LOL its been a long day I was tring to help (skimming a little)...thanks for pointing that out for me :)
 
Your path in setup.sh has an error in checking for perl on FreeBSD 5.1 keep in mind that this is not the case in FreeBSD 4.9 it is still /usr/bin/perl

5.x the location for perl now is:

/usr/local/bin/perl

I would rather check for perl doing something like:

pkg_info | grep perl

This way you do not need to keep track of the paths..
 
Last edited:
Actually it's not really wrong, it's just the ports package of perl installs it in a different place then if you installed it by hand. When you run "pkg_add -r perl5.8" it gives you a cmd, can't remember the exact cmd. It's something like "use.perl port". If that is run, the system will make the proper adjustments so with sym linking to make sure script on the system will find it. This is also necessary because it makes changes to make.conf file so that all new ports will use the new version of perl.

Once that cmd is run there is no need for the setup.h to go looking for perl any more and it really needs to be run anyway considering the changes it makes to make.conf.
 
Hello,

Alright, I've added:
Code:
if [ $OS = "FreeBSD" ]; then
        PERL=`pkg_info | grep -ce '^perl'`;
else
        PERL=`checkFile /usr/bin/perl`;
fi

and I've added the "use.perl port" as well.

John
 
Alright, I've added:
Code:
if [ $OS = "FreeBSD" ]; then
        PERL=`pkg_info | grep -ce '^perl'`;
else
        PERL=`checkFile /usr/bin/perl`;
fi

[/B][/QUOTE] 

Using the new setup.sh:

# sh setup.sh
perl: not found
perl: not found
Please enter your Client ID : 

This is because the following is executed prior to the check:

ADMIN_PASS=`perl -le'print map+(A..Z,a..z,0..9)[rand 62],0..7'`;
DB_ROOT_PASS=`perl -le'print map+(A..Z,a..z,0..9)[rand 62],0..7'`;
 
Hello,

Yes, that's fine because later in the script we have:
Code:
if [ $PERL -eq 0 ]; then
        addPackage perl5.8 $perl
        use.perl port 2> /dev/null > /dev/null
        ADMIN_PASS=`/usr/bin/perl -le'print map+(A..Z,a..z,0..9)[rand 62],0..7'`;
        DB_ROOT_PASS=`/usr/bin/perl -le'print map+(A..Z,a..z,0..9)[rand 62],0..7'`;
fi
so if perl gets installed, it will reset those values. I could just move the initial setting of the passwords to after everthing is setup.

John
 
Back
Top