PDA

View Full Version : Perl removed from base installation



rhoekman
01-12-2004, 08:59 PM
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"

Xuru
01-12-2004, 09:19 PM
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.

rhoekman
01-12-2004, 09:33 PM
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..

existenz
01-12-2004, 09:35 PM
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

rhoekman
01-12-2004, 09:40 PM
Or as I mentioned in my firstpost:

pkg_add -r perl5.8

:)

existenz
01-12-2004, 09:56 PM
LOL its been a long day I was tring to help (skimming a little)...thanks for pointing that out for me :)

DirectAdmin Support
01-13-2004, 09:12 AM
Added to the setup.sh

John

rhoekman
01-13-2004, 10:32 PM
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..

Xuru
01-14-2004, 05:46 AM
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.

rhoekman
01-14-2004, 09:37 AM
You are right.. The symlink is not created. use.perl port should be issued after installation.

DirectAdmin Support
01-14-2004, 09:39 AM
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

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

[/B]

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'`;

DirectAdmin Support
01-20-2004, 10:33 AM
Hello,

Yes, that's fine because later in the script we have:


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