doinst () 
{ 
    ff=`grep "/usr/lib/R/lib" etc/ld.so.conf`;
    if [ ! "$ff" ]; then
        echo "Adding the R directory to the file: /etc/ld.so.conf";
        echo "/usr/lib/R/lib" >> etc/ld.so.conf;
        ldconfig;
    fi;
    unset ff
}
doinst
