Skip to main content
fixed code indent
Source Link
janos
  • 113.1k
  • 15
  • 154
  • 396

Here is simplified version of the script:

    #! /bin/bash
    
    DRV_PKG_NAME="e1000e-3.0.4.tar.gz"
    DRV_PKG_URL="http://downloadmirror.intel.com/15817/eng/e1000e-3.0.4.tar.gz"
    ERR_LOG="err.log"

    # Redirecting all stderr 
    exec 2>$ERR_LOG
    
    # Function declaration
    error_action () {
        echo "Failed!" 
        exit 1
    }
    
    # Downloading driver and extracting it to the current directory
    echo "Downloading and extracting driver package..."
    
    wget -q ${DRV_PKG_URL} && tar zxf ${DRV_PKG_NAME} || error_action
    
    # Installing required build dependencies if necessary
    echo "Installing build dependencies..."
    
    apt-get install -y build-essential linux-headers-$(uname -r) >/dev/null || error_action
    
    # Going into the driver source directory
    cd e1000e-3.0.4/src/ 
    
    # Building driver and updating initramfs
    echo "Building module and updating initramfs..."
    
    { make install && update-initramfs -k all -u; } >/dev/null || error_action 
    
    echo "Purging unnecessary build dependencies..."
    
    apt-get -y purge build-essential >/dev/null || error_action
    
    # Restarting iface
    echo "Restarting iface..."
    
    { ifdown eth0  && ifup eth0; } &>/dev/null || error_action
    
    # Checking installed driver version
    if [[ $(modinfo -F version e1000e) == "3.0.4-NAPI" ]]; then
        echo "Driver successfully installed!"
    else 
        echo "Something wrong... Try depmod -a or re-install again!"
        exit 1
    fi

exit 0

Here is simplified version of the script:

    #! /bin/bash
    
    DRV_PKG_NAME="e1000e-3.0.4.tar.gz"
    DRV_PKG_URL="http://downloadmirror.intel.com/15817/eng/e1000e-3.0.4.tar.gz"
    ERR_LOG="err.log"

    # Redirecting all stderr 
    exec 2>$ERR_LOG
    
    # Function declaration
    error_action () {
        echo "Failed!" 
        exit 1
    }
    
    # Downloading driver and extracting it to the current directory
    echo "Downloading and extracting driver package..."
    
    wget -q ${DRV_PKG_URL} && tar zxf ${DRV_PKG_NAME} || error_action
    
    # Installing required build dependencies if necessary
    echo "Installing build dependencies..."
    
    apt-get install -y build-essential linux-headers-$(uname -r) >/dev/null || error_action
    
    # Going into the driver source directory
    cd e1000e-3.0.4/src/ 
    
    # Building driver and updating initramfs
    echo "Building module and updating initramfs..."
    
    { make install && update-initramfs -k all -u; } >/dev/null || error_action 
    
    echo "Purging unnecessary build dependencies..."
    
    apt-get -y purge build-essential >/dev/null || error_action
    
    # Restarting iface
    echo "Restarting iface..."
    
    { ifdown eth0  && ifup eth0; } &>/dev/null || error_action
    
    # Checking installed driver version
    if [[ $(modinfo -F version e1000e) == "3.0.4-NAPI" ]]; then
        echo "Driver successfully installed!"
    else 
        echo "Something wrong... Try depmod -a or re-install again!"
        exit 1
    fi

exit 0

Here is simplified version of the script:

#! /bin/bash

DRV_PKG_NAME="e1000e-3.0.4.tar.gz"
DRV_PKG_URL="http://downloadmirror.intel.com/15817/eng/e1000e-3.0.4.tar.gz"
ERR_LOG="err.log"

# Redirecting all stderr 
exec 2>$ERR_LOG

# Function declaration
error_action () {
    echo "Failed!" 
    exit 1
}

# Downloading driver and extracting it to the current directory
echo "Downloading and extracting driver package..."

wget -q ${DRV_PKG_URL} && tar zxf ${DRV_PKG_NAME} || error_action

# Installing required build dependencies if necessary
echo "Installing build dependencies..."

apt-get install -y build-essential linux-headers-$(uname -r) >/dev/null || error_action

# Going into the driver source directory
cd e1000e-3.0.4/src/ 

# Building driver and updating initramfs
echo "Building module and updating initramfs..."

{ make install && update-initramfs -k all -u; } >/dev/null || error_action 

echo "Purging unnecessary build dependencies..."

apt-get -y purge build-essential >/dev/null || error_action

# Restarting iface
echo "Restarting iface..."

{ ifdown eth0  && ifup eth0; } &>/dev/null || error_action

# Checking installed driver version
if [[ $(modinfo -F version e1000e) == "3.0.4-NAPI" ]]; then
    echo "Driver successfully installed!"
else 
    echo "Something wrong... Try depmod -a or re-install again!"
    exit 1
fi

exit 0
added 27 characters in body
Source Link

Here is simplified version of the script:

    #! /bin/bash
    
    DRV_PKG_NAME="e1000e-3.0.4.tar.gz"
    DRV_PKG_URL="http://downloadmirror.intel.com/15817/eng/e1000e-3.0.4.tar.gz"
    ERR_LOG="err.log" 

    # Redirecting all stderr 
    exec 2>$ERR_LOG
    
    # Function declaration
    error_action () {
        echo "Failed!" 
        exit 1
    }
    
    # Downloading driver and extracting it to the current directory
    echo "Downloading and extracting driver package..."
    
    wget -q ${DRV_PKG_URL} && tar zxf ${DRV_PKG_NAME} || error_action
    
    # Installing required build dependencies if necessary
    echo "Installing build dependencies..."
    
    apt-get install -y build-essential linux-headers-$(uname -r) >/dev/null || error_action
    
    # Going into the driver source directory
    cd e1000e-3.0.4/src/ 
    
    # Building driver and updating initramfs
    echo "Building module and updating initramfs..."
    
    { make install && update-initramfs -k all -u; } >/dev/null || error_action 
    
    echo "Purging unnecessary build dependencies..."
    
    apt-get -y purge build-essential >/dev/null || error_action
    
    # Restarting iface
    echo "Restarting iface..."
    
    { ifdown eth0  && ifup eth0; } &>/dev/null || error_action
    
    # Checking installed driver version
    if [[ $(modinfo -F version e1000e) == "3.0.4-NAPI" ]]; then
        echo "Driver successfully installed!"
    else 
        echo "Something wrong... Try depmod -a or re-install again!"
        exit 1
    fi

exit 0

Here is simplified version of the script:

    #! /bin/bash
    
    DRV_PKG_NAME="e1000e-3.0.4.tar.gz"
    DRV_PKG_URL="http://downloadmirror.intel.com/15817/eng/e1000e-3.0.4.tar.gz"
    ERR_LOG="err.log"
    
    exec 2>$ERR_LOG
    
    error_action () {
        echo "Failed!" 
        exit 1
    }
    
    # Downloading driver and extracting it to the current directory
    echo "Downloading and extracting driver package..."
    
    wget -q ${DRV_PKG_URL} && tar zxf ${DRV_PKG_NAME} || error_action
    
    # Installing required build dependencies if necessary
    echo "Installing build dependencies..."
    
    apt-get install -y build-essential linux-headers-$(uname -r) >/dev/null || error_action
    
    # Going into the driver source directory
    cd e1000e-3.0.4/src/ 
    
    # Building driver and updating initramfs
    echo "Building module and updating initramfs..."
    
    { make install && update-initramfs -k all -u; } >/dev/null || error_action 
    
    echo "Purging unnecessary build dependencies..."
    
    apt-get -y purge build-essential >/dev/null || error_action
    
    # Restarting iface
    echo "Restarting iface..."
    
    { ifdown eth0  && ifup eth0; } &>/dev/null || error_action
    
    # Checking installed driver version
    if [[ $(modinfo -F version e1000e) == "3.0.4-NAPI" ]]; then
        echo "Driver successfully installed!"
    else 
        echo "Something wrong... Try depmod -a or re-install again!"
        exit 1
    fi

exit 0

Here is simplified version of the script:

    #! /bin/bash
    
    DRV_PKG_NAME="e1000e-3.0.4.tar.gz"
    DRV_PKG_URL="http://downloadmirror.intel.com/15817/eng/e1000e-3.0.4.tar.gz"
    ERR_LOG="err.log" 

    # Redirecting all stderr 
    exec 2>$ERR_LOG
    
    # Function declaration
    error_action () {
        echo "Failed!" 
        exit 1
    }
    
    # Downloading driver and extracting it to the current directory
    echo "Downloading and extracting driver package..."
    
    wget -q ${DRV_PKG_URL} && tar zxf ${DRV_PKG_NAME} || error_action
    
    # Installing required build dependencies if necessary
    echo "Installing build dependencies..."
    
    apt-get install -y build-essential linux-headers-$(uname -r) >/dev/null || error_action
    
    # Going into the driver source directory
    cd e1000e-3.0.4/src/ 
    
    # Building driver and updating initramfs
    echo "Building module and updating initramfs..."
    
    { make install && update-initramfs -k all -u; } >/dev/null || error_action 
    
    echo "Purging unnecessary build dependencies..."
    
    apt-get -y purge build-essential >/dev/null || error_action
    
    # Restarting iface
    echo "Restarting iface..."
    
    { ifdown eth0  && ifup eth0; } &>/dev/null || error_action
    
    # Checking installed driver version
    if [[ $(modinfo -F version e1000e) == "3.0.4-NAPI" ]]; then
        echo "Driver successfully installed!"
    else 
        echo "Something wrong... Try depmod -a or re-install again!"
        exit 1
    fi

exit 0
deleted 1 characters in body
Source Link

Here is simplified version of the script:

    #! /bin/bash
    
    DRV_PKG_NAME="e1000e-3.0.4.tar.gz"
    DRV_PKG_URL="http://downloadmirror.intel.com/15817/eng/e1000e-3.0.4.tar.gz"
    ERR_LOG="err.log"
    
    exec 2>$ERR_LOG
    
    error_action () {
        echo "Failed!" 
        exit 1
    }
    
    # Downloading driver and extracting it to the current directory
    echo "Downloading and extracting driver package..."
    
    wget -q ${DRV_PKG_URL} && tar zxf ${DRV_PKG_NAME} || error_action
    
    # Installing required build dependencies if necessary
    echo "Installing build dependencies..."
    
    apt-get install -y build-essential linux-headers-$(uname -r) >/dev/null || error_action
    
    # Going into the driver source directory
    cd e1000e-3.0.4/src/ 
    
    # Building driver and updating initramfs
    echo "Building module and updating initramfs..."
    
    { make install && update-initramfs -k all -u; } >/dev/null || error_action 
    
    echo "Purging unnecessary build dependencies..."
    
    apt-get -y purge build-essential >/dev/null || error_action
    
    # Restarting iface
    echo "Restarting iface..."
    
    { ifdown eth0  && ifup eth0; } &>/dev/null || error_action
    
    # Checking installed driver version
    if [[ $(modinfo -F version e1000e) == "3.0.4-NAPI" ]] ;]]; then
        echo "Driver successfully installed!"
    else 
        echo "Something wrong... Try depmod -a or re-install again!"
        exit 1
    fi

exit 0

Here is simplified version of the script:

    #! /bin/bash
    
    DRV_PKG_NAME="e1000e-3.0.4.tar.gz"
    DRV_PKG_URL="http://downloadmirror.intel.com/15817/eng/e1000e-3.0.4.tar.gz"
    ERR_LOG="err.log"
    
    exec 2>$ERR_LOG
    
    error_action () {
        echo "Failed!" 
        exit 1
    }
    
    # Downloading driver and extracting it to the current directory
    echo "Downloading and extracting driver package..."
    
    wget -q ${DRV_PKG_URL} && tar zxf ${DRV_PKG_NAME} || error_action
    
    # Installing required build dependencies if necessary
    echo "Installing build dependencies..."
    
    apt-get install -y build-essential linux-headers-$(uname -r) >/dev/null || error_action
    
    # Going into the driver source directory
    cd e1000e-3.0.4/src/ 
    
    # Building driver and updating initramfs
    echo "Building module and updating initramfs..."
    
    { make install && update-initramfs -k all -u; } >/dev/null || error_action 
    
    echo "Purging unnecessary build dependencies..."
    
    apt-get -y purge build-essential >/dev/null || error_action
    
    # Restarting iface
    echo "Restarting iface..."
    
    { ifdown eth0  && ifup eth0; } &>/dev/null || error_action
    
    # Checking installed driver version
    if [[ $(modinfo -F version e1000e) == "3.0.4-NAPI" ]] ; then
        echo "Driver successfully installed!"
    else 
        echo "Something wrong... Try depmod -a or re-install again!"
        exit 1
    fi

exit 0

Here is simplified version of the script:

    #! /bin/bash
    
    DRV_PKG_NAME="e1000e-3.0.4.tar.gz"
    DRV_PKG_URL="http://downloadmirror.intel.com/15817/eng/e1000e-3.0.4.tar.gz"
    ERR_LOG="err.log"
    
    exec 2>$ERR_LOG
    
    error_action () {
        echo "Failed!" 
        exit 1
    }
    
    # Downloading driver and extracting it to the current directory
    echo "Downloading and extracting driver package..."
    
    wget -q ${DRV_PKG_URL} && tar zxf ${DRV_PKG_NAME} || error_action
    
    # Installing required build dependencies if necessary
    echo "Installing build dependencies..."
    
    apt-get install -y build-essential linux-headers-$(uname -r) >/dev/null || error_action
    
    # Going into the driver source directory
    cd e1000e-3.0.4/src/ 
    
    # Building driver and updating initramfs
    echo "Building module and updating initramfs..."
    
    { make install && update-initramfs -k all -u; } >/dev/null || error_action 
    
    echo "Purging unnecessary build dependencies..."
    
    apt-get -y purge build-essential >/dev/null || error_action
    
    # Restarting iface
    echo "Restarting iface..."
    
    { ifdown eth0  && ifup eth0; } &>/dev/null || error_action
    
    # Checking installed driver version
    if [[ $(modinfo -F version e1000e) == "3.0.4-NAPI" ]]; then
        echo "Driver successfully installed!"
    else 
        echo "Something wrong... Try depmod -a or re-install again!"
        exit 1
    fi

exit 0
deleted 12 characters in body
Source Link
Loading
deleted 12 characters in body
Source Link
Loading
Source Link
Loading