[linux] Met bash parameter functie aanroepen, typo fix

Geert Stappers stappers op stappers.nl
Zo Dec 17 22:42:40 CET 2017


On Sun, Dec 17, 2017 at 07:31:14PM +0100, Frans van Berckel wrote:
> 
> Ik ben er gewoon nog niet helemaal uit.
> Weet je wat, ik slaap er nog een nachtje over.

goeie morgen   ;-)


> De source van het bash script zit in de bijlage.
> 
> Met vriendelijke groet,
> 
> 
> Frans van Berckel

> #
> ##!/bin/bash ##
> #
> 
> #
> ## Building an oldstable Debian kernel packages,
> ## which is no longer available in unstable
> #
> ## Copyright (c) $year Frans van Berckel
> #
> 
> major=3.16
> minor=3.16.51-3
> arch=$(uname -i)
> 
> ## Install necessary packages
> apt-get update
> apt-get --no-install-recommends install kernel-package fakeroot -y
> 
> ## Download oldstable, install, extract sources
> download(){
> if ! [ -x "$(command -v wget)" ]; then
>   echo 'Error: wget is not installed.' >&2
>   apt-get install wget -y
> fi
> mkdir -p /usr/src
> cd /usr/src
> wget -c https://deb.debian.org/debian/pool/main/l/linux/linux-source-${major}_${minor}_all.deb
> dpkg -i linux-source-${major}_${manor}_all.deb

  dpkg -i linux-source-${major}_${minor}_all.deb

> tar xjvf linux-source-${major}.tar.bz2
> }
> 
> config(){
> if ! [ -x "$(command -v xzcat)" ]; then
>   echo 'Error: xzcat is not installed.' >&2
>   apt-get install xz-utils -y
> fi
> cd /usr/src/linux-source-${major}
> xzcat ../linux-config-${major}/config.${arch}_none_${arch}.xz >> ./.config
> ## Generate config with default from the ARCH supplied defconfig file
> make ARCH=${arch} defconfig
> }
> 
> menuconfig(){
> ## Generate by an ncurses-based pseudo-graphical menu
> apt-get install libncurses-dev -y
> cd /usr/src/linux-source-${major}
> make menuconfig
> ## Load alternative config file - .config
> ## Edit config and save
> }
> 
> makepkg(){
> #Build the kernel packages
> if ! [ -x "$(command -v nproc)" ]; then
>   echo 'Error: nproc is not installed.' >&2
>   apt-get install coreutils -y
> fi
> cd /usr/src/linux-source-${major}
> make-kpkg clean
> make-kpkg --rootcmd fakeroot --jobs $(`nproc`) --initrd kernel_image kernel_headers
> }
> 
> ##Install the new kernel
> #cd /usr/src
> #Check file names before running dpkg
> #dpkg -i linux-image-${major}_${minor}_${arch}.deb
> #dpkg -i linux-headers-${major}_${minor}_${arch}.deb

> 


-- 
Groeten
Geert Stappers
-- 
Leven en laten leven


Meer informatie over de Linux maillijst