| #!/bin/csh -f |
| # |
| set dir=`pwd` |
| if ($dir =~ */SunOS4) cd .. |
| echo "Installing ip_input.c and ip_output.c" |
| cp SunOS4/{ip_input.c,ip_output.c} /sys/netinet |
| chmod 644 /sys/netinet/{ip_input.c,ip_output.c} |
| |
| set karch=`/bin/arch -k` |
| set confdir="/sys/$karch/conf" |
| set config=`/bin/ls -1t $confdir | head -1` |
| |
| echo -n "Kernel configuration to update [$config] " |
| set newconfig=$< |
| if ( "$newconfig" == "" ) then |
| set newconfig=$config |
| endif |
| echo "Updating $newconfig..." |
| if ( -d /sys/$karch/$newconfig ) then |
| mv /sys/$karch/$newconfig /sys/$karch/$newconfig.bak |
| endif |
| mv $confdir/$newconfig $confdir/$newconfig.bak |
| awk '{print $0;if($2=="INET"){print"options IPFILTER_LKM"}}' \ |
| $confdir/$newconfig.bak > $confdir/$newconfig |
| echo "Running config $newconfig" |
| cd $confdir |
| config $newconfig |
| echo "Building a new kernel" |
| cd ../$newconfig |
| make |
| if ($status == 0) then |
| echo "New kernel is: /sys/$karch/$newconfig/vmunix" |
| ls -ls /sys/$karch/$newconfig/vmunix |
| endif |
| exit 0 |