[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Kernel version check, init scripts



(sorry if this is a bit long...)

I have a few questions related to my (still-unfinished) MacGate packages:

- MacGate requires kernel 2.1.90 or greater (or the "AppleTalkSuite"
patch for 2.0, but I've found this patch to be rather buggy).  In the
obligatory new-maintainer conversation, James suggested checking the
kernel version in the postinst and warning the user that the package
won't work if it's wrong.  I'm thinking something like (I'm a bit of a
novice shell programmer):

version=`uname -r`
major=`expr $kernelver : '.*\.\(.*\)\.'`
minor=`expr $kernelver : '.*\.\(.*\)'`

if [ $major -lt 1 -o $minor -lt 90 ]; then                                      
        cat <<EOF                                                               
This package requires a kernel version of at least 2.1.90.  Your kernel         
version is $version.  This package will be configured, but it will not        
work as intended unless you use a kernel with the correct version of the        
IPDDP driver.  You can either use an experimental kernel or a 2.0.34            
kernel with the "AppleTalkSuite" patch, available at                          
ftp://ftp.uk.linux.org/pub/people/jschlst/.                                     
                                                                                
Press [RETURN] to continue.                                                     
EOF                                                                             
        read                                                                    
fi                                                                              

I could also check for the patch by grepping for 'ipddp' in
/boot/System.map-$version... this file is guaranteed to exist if you use
make-kpkg, correct?  (I would still have to check that $minor > 90 if
$major = 1, because earlier 2.1 kernels had a broken version of the
IPDDP driver...)

- MacGated, the daemon in the package, doesn't use a config file, so
you have to pass it all its configuration on the command-line.  I was
thinking of creating an /etc/macgated.conf file in the postinst and
sourcing it in the init script - is this the recommended course of action?

Once again, congrats to all on getting hamm out the door... I'm eagerly
awaiting my source CD, which surely holds the answers to all of life's
mysteries...

Cheers

-- 
          David Huggins-Daines - bn711@freenet.carleton.ca
           PGP public key #63A8B719 on public key servers
    fingerprint=4F 38 A2 34 E1 E0 B7 6E  C3 DA 6C E3 C6 6A 05 62


--  
To UNSUBSCRIBE, email to debian-mentors-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: