in reply to Perl/Linux

Umm, the kernel there is not written in Perl. In fact, I don't think you could call a kernel written in Perl to be "Linux". Other than the Perl interpreter itself, the other non-Perl code is a small version of the Unix standard library (uClib). I haven't actually tried it, but I'm wondering if they have init as a compiled program, too?

Most of it looks like it came from Perl Power Tools, which has been around for a while.

"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Replies are listed 'Best First'.
Re^2: Perl/Linux
by jonnybe (Scribe) on Oct 08, 2004 at 17:11 UTC
    Don't think you need a c compiled init:
    lilo: linux init="/usr/bin/perl /usr/local/sbin/init.pl"
    Now this is totally untested, but I have run a shell in place of init many times. Anyone know if the linux kernel or lilo take multiword environment variables?

    Jon

      You don't need to. If /sbin/init is mode (at least) 555 and starts with the line "#!/bin/perl" (without quotes of course) and perl is really in /bin (no link) then this script will start as init. /usr/bin/perl doesn't work every time because /usr could be umounted.
        If /usr is on a seperate fs, it would also require having /usr/lib/perl moved to /lib/perl; other library dependencies would have to be moved too...including any needed modules.

        I've talked about this enough. I think I'm going to throw together a test system :D

        Jon