summaryrefslogtreecommitdiffstats
path: root/client/boot-tools/clientstructure/root/GenerateInitrd.generic.sh
diff options
context:
space:
mode:
authoradv <adv@uma.es>2011-04-08 13:46:32 +0000
committeradv <adv@uma.es>2011-04-08 13:46:32 +0000
commitf3d6aeb4d9e4fcfae7cc4bf0a408d9e7286d4c87 (patch)
treefa1e8da7154c5f814446dcbd6d61b13b1d4e6955 /client/boot-tools/clientstructure/root/GenerateInitrd.generic.sh
parent0176a459d7df62d6cb07c2df6457dfbc974a5dbc (diff)
version1.0 renombrando ogclient boot-tools
git-svn-id: https://opengnsys.es/svn/branches/version1.0@1760 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/boot-tools/clientstructure/root/GenerateInitrd.generic.sh')
-rwxr-xr-xclient/boot-tools/clientstructure/root/GenerateInitrd.generic.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/client/boot-tools/clientstructure/root/GenerateInitrd.generic.sh b/client/boot-tools/clientstructure/root/GenerateInitrd.generic.sh
new file mode 100755
index 00000000..eaeb475b
--- /dev/null
+++ b/client/boot-tools/clientstructure/root/GenerateInitrd.generic.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+export OSDISTRIB=$(lsb_release -i | awk -F: '{sub(/\t/,""); print $2}') 2>/dev/null
+#OSCODENAME=$(lsb_release -c | awk -F: '{sub(/\t/,""); print $2}') 2>/dev/null
+export OSCODENAME=$(cat /etc/lsb-release | grep CODENAME | awk -F= '{print $NF}')
+export OSRELEASE=$(uname -a | awk '{print $3}')
+uname -a | grep x86_64 > /dev/null && export OSARCH=amd64 || export OSARCH=i386
+export OSHTTP="http://es.archive.ubuntu.com/ubuntu/"
+
+
+
+cd /usr/lib/initramfs-tools/bin/
+rm *
+cp /bin/busybox ./
+cd /tmp/
+mkinitramfs -o /tmp/initrd.img-$OSRELEASE -v $OSRELEASE
+cp /boot/vmlinuz-$OSRELEASE /tmp \ No newline at end of file