Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/next/external/cache/sources/linuxpg/pgload.sh
Views: 3959
#!/bin/sh1# pgload, v2.1 2011/09/232module="pgdrv"3#mode="664"45# check whrther the kernel is valid or not6#version1=`uname -r | cut -d '.' -f 1`7#version2=`uname -r | cut -d '.' -f 2`8#version3=`uname -r | cut -d '.' -f 3`9#version3=${version3%%-*}10#if [ "$version1" != "2" ] || [ "$version2" != "6" ] ; then11# echo " Your version of kernel is `uname -r`"12# echo " The kernel is too outdated to be used."13# echo " Please update the version to 2.6.16 or later."14# exit 115#elif test $version3 -lt 11 ; then16# echo " Your version of kernel is `uname -r`"17# echo " The kernel is outdated."18# echo " Please update the version to 2.6.11 or later."19#fi2021# invoke insmod with all arguments we got22# and use a pathname, as insmod doesn't look in . by default23check=`lsmod | grep r8169`24if [ "$check" != "" ]; then25echo "rmmod r8169"26/sbin/rmmod r816927fi2829check=`lsmod | grep r8168`30if [ "$check" != "" ]; then31echo "rmmod r8168"32/sbin/rmmod r816833fi3435check=`lsmod | grep r8125`36if [ "$check" != "" ]; then37echo "rmmod r8125"38/sbin/rmmod r812539fi4041check=`lsmod | grep r8101`42if [ "$check" != "" ]; then43echo "rmmod r8101"44/sbin/rmmod r810145fi4647check=`lsmod | grep $module`48if [ "$check" != "" ]; then49echo "$module has existed."50echo "$check"51exit 152else53if test -e ./$module.ko ; then54echo "insmod $module.ko $*"55/sbin/insmod ./$module.ko $* || exit 156else57echo "make clean all"58make clean all 1>/dev/null59if test -e ./$module.ko ; then60echo "insmod $module.ko $*"61/sbin/insmod ./$module.ko $* || exit 162else63echo "$module.ko doesn't exist."64exit 165fi66fi67fi6869exit 0707172