| View previous topic :: View next topic |
| Author |
Message |
master_kernel Moderator


Joined: 28 Oct 2007 Posts: 66
|
Posted: Fri Nov 09, 2007 5:25 pm Post subject: First BASH script for Desktop Linux |
|
|
This script is for installing RC1 of the kernel that we will [hopefully] use in Desktop Linux. It can be downloaded from http://kcheck.sourceforge.net/greenhydra/kernel/linux-2.6.23.1/greenhydra-rc1.sh.
-----------
#!/bin/bash
#
# GNU Public License Version 3.0.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http>.
#
#
# Simple script to download and install the GreenHydra kernel
# coded by hand by master_kernel
#
# Release: 2.6.23.1-greenhydra Release Candidate 1
# Architecutre: i386
# Constants
ARCH=`uname -m`
# Functions
function check_md5sums
{
cat > checksums.md5 <<- _EOF_
c0906fe7006eb442cd0b70d931c8032e linux-doc-2.6.23.1-greenhydra_all.deb
0262869d8dd8e181268b6d301b7d08a5 linux-headers-2.6.23.1-greenhydra_i386.deb
9253fc5e719f94ae8a9c8a3682b10855 linux-image-2.6.23.1-greenhydra_i386.deb
435d313fd5e2df4c2eee4b30d3b2ec60 linux-manual-2.6.23.1-greenhydra_all.deb
_EOF_
md5sum -c checksums.md5
test_fail
}
function no_root
{
if [ $UID -eq 0 ]
then
echo "You cannot be root to run this script!"
echo "Aborting."
exit 1
fi
}
function test_fail
{
if [ $? -ne 0 ]
then
echo "The previous command exited with an exit status that was not successful($?). I cannot continue."
exit 1
fi
}
function term_exit
{
echo "Terminated."
echo
exit 2
}
function int_exit
{
echo "Interrupted."
echo
exit 2
}
function cool_exit
{
echo "Process completed."
echo "Exiting with cool exit status 0."
echo
exit 0
}
# Main Logic
# Trap signals
trap term_exit TERM HUP
trap int_exit INT
# You can't be root when you run this
no_root
# If architecture is 64-bit, don't continue
if [ "$ARCH" = "x86_64" ]
then
echo "Your architecture is 64-bit, which is incompatible with this GreenHydra kernel."
echo "Aborting with exit status 1."
exit 1
fi
# Make a new directory and change to it
cd ~
test_fail
rm -rf GreenHydra-RC1
test_fail
mkdir GreenHydra-RC1
test_fail
cd GreenHydra-RC1
test_fail
# Download the files
echo -e "\033[1;32mRetrieving GreenHydra kernel sanitized headers...\033[0m"
wget --tries=3 http://kcheck.sourceforge.net/greenhydra/kernel/linux-2.6.23.1/linux-headers-2.6.23.1-greenhydra_i386.deb
test_fail
echo -e "\033[1;32mRetrieving GreenHydra kernel image...\033[0m"
wget --tries=3 http://kcheck.sourceforge.net/greenhydra/kernel/linux-2.6.23.1/linux-image-2.6.23.1-greenhydra_i386.deb
test_fail
echo -e "\033[1;32mRetrieving GreenHydra kernel documentation...\033[0m"
wget --tries=3 http://kcheck.sourceforge.net/greenhydra/kernel/linux-2.6.23.1/linux-doc-2.6.23.1-greenhydra_all.deb
test_fail
echo -e "\033[1;32mRetrieving GreenHydra kernel manual...\033[0m"
wget --tries=3 http://kcheck.sourceforge.net/greenhydra/kernel/linux-2.6.23.1/linux-manual-2.6.23.1-greenhydra_all.deb
test_fail
# Verify download
echo
echo "Verifying downloads..."
check_md5sums
# Install the files
echo
echo "Initializing install...Root privileges needed."
sudo dpkg -i linux-headers-2.6.23.1-greenhydra_i386.deb linux-image-2.6.23.1-greenhydra_i386.deb linux-doc-2.6.23.1-greenhydra_all.deb linux-manual-2.6.23.1-greenhydra_all.deb
test_fail
# Exit "cool"
echo
cool_exit |
|
| Back to top |
|
 |
Sorivenul Alpha Project


Joined: 13 Nov 2007 Posts: 41 Location: SoDak, USA
|
Posted: Fri Nov 16, 2007 10:40 am Post subject: Green Hydra Kernel |
|
|
| May seem kind of ignorant, but what is different between this Green Hydra testing kernel and say a plain vanilla kernel? |
|
| Back to top |
|
 |
master_kernel Moderator


Joined: 28 Oct 2007 Posts: 66
|
Posted: Fri Nov 16, 2007 11:45 am Post subject: Re: Green Hydra Kernel |
|
|
| Sorivenul wrote: | | May seem kind of ignorant, but what is different between this Green Hydra testing kernel and say a plain vanilla kernel? |
Nothing yet... I just needed to name it . _________________ master_kernel |
|
| Back to top |
|
 |
Sorivenul Alpha Project


Joined: 13 Nov 2007 Posts: 41 Location: SoDak, USA
|
Posted: Fri Nov 16, 2007 12:23 pm Post subject: Green Hydra |
|
|
Okay. I was curious and that answered question.
Also, do you have an idea/outline of the projected differences between GreenHydra and a vanilla kernel, based on other forum discussions, etc.? |
|
| Back to top |
|
 |
jc87 Newbie

Joined: 14 Nov 2007 Posts: 3
|
Posted: Fri Nov 16, 2007 12:43 pm Post subject: |
|
|
| Just for curiosity, why dont you provide kernel .debs instead? |
|
| Back to top |
|
 |
master_kernel Moderator


Joined: 28 Oct 2007 Posts: 66
|
Posted: Fri Nov 16, 2007 2:08 pm Post subject: |
|
|
| jc87 wrote: | | Just for curiosity, why dont you provide kernel .debs instead? |
1. Because they would have to be for multiple architectures
2. People can't customize their kernel the way they could if they built them themselves
3. I would have to consider disk space
4. The SF administration wouldn't be happy with me hogging bandwidthf
master_kernel _________________ master_kernel |
|
| Back to top |
|
 |
|