Re: [PATCH] Added Ubuntu mode.
Cody A.W. Somerville wrote:
> Hello Folks,
Hi,
generellay everything fine, just a few cosmetic issues..
diff --git a/functions/defaults.sh b/functions/defaults.sh
index 2b2e3f7..dfe8d48 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -25,6 +25,10 @@ Set_defaults ()
LH_DISTRIBUTION="lenny"
;;
+ ubuntu)
+ LH_DISTRIBUTION="jaunty"
+ ;;
+
emdebian)
LH_DISTRIBUTION="sid"
;;
here and afterwards as well: when having case decisions, please keep the
alphabetic order: debian, emdebian, ubuntu.
@@ -337,6 +385,18 @@ Set_defaults ()
LH_MIRROR_BINARY_SECURITY="http://security.debian.org/"
;;
+ ubuntu)
+ case "${LH_ARCHITECTURE}" in
+ amd64|i386)
+ LH_MIRROR_BINARY_SECURITY="http://archive.ubuntu.com/ubuntu/"
+ ;;
+
+ *)
+ LH_MIRROR_BINARY_SECURITY="http://ports.ubuntu.com/"
+ ;;
+ esac
+ ;;
+
emdebian)
LH_MIRROR_BINARY_SECURITY="none"
;;
please fix the indenting here.
@@ -399,7 +463,12 @@ Set_defaults ()
;;
amd64)
- LH_LINUX_FLAVOURS="amd64"
+ if [ "${LH_MODE}" = "ubuntu" ]
+ then
+ LH_LINUX_FLAVOURS="generic"
+ else
+ LH_LINUX_FLAVOURS="amd64"
+ fi
;;
please use case here, not if.
hppa)
@@ -407,15 +476,20 @@ Set_defaults ()
;;
i386)
- case "${LIST}" in
- stripped|minimal)
- LH_LINUX_FLAVOURS="486"
- ;;
-
- *)
- LH_LINUX_FLAVOURS="486 686"
- ;;
- esac
+ if [ "${LH_MODE}" = "ubuntu" ]
+ then
+ LH_LINUX_FLAVOURS="generic"
+ else
+ case "${LIST}" in
+ stripped|minimal)
+ LH_LINUX_FLAVOURS="486"
+ ;;
+
+ *)
+ LH_LINUX_FLAVOURS="486 686"
+ ;;
+ esac
+ fi
;;
i probably would use case here as well.
@@ -461,20 +535,27 @@ Set_defaults ()
# Set linux packages
if [ -z "${LH_LINUX_PACKAGES}" ]
then
- LH_LINUX_PACKAGES="linux-image-2.6 \${LH_UNION_FILESYSTEM}-modules-2.6"
+ case "${LH_MODE}" in
+ debian|debian-release|embedian)
+ LH_LINUX_PACKAGES="linux-image-2.6
\${LH_UNION_FILESYSTEM}-modules-2.6"
+ if [ "${LH_CHROOT_FILESYSTEM}" = "squashfs" ]
+ then
+ LH_LINUX_PACKAGES="${LH_LINUX_PACKAGES}
squashfs-modules-2.6"
+ fi
please fix indenting.
- if [ "${LH_CHROOT_FILESYSTEM}" = "squashfs" ]
- then
- LH_LINUX_PACKAGES="${LH_LINUX_PACKAGES} squashfs-modules-2.6"
- fi
+ case "${LH_ENCRYPTION}" in
+ ""|disabled)
+ ;;
+ *)
+ LH_LINUX_PACKAGES="${LH_LINUX_PACKAGES}
loop-aes-modules-2.6"
+ ;;
+ esac
+ ;;
please fix indenting.
@@ -647,6 +728,15 @@ Set_defaults ()
LH_BOOTAPPEND_INSTALL=" -- \${LH_BOOTAPPEND_LIVE}"
fi
fi
+
+ if [ "${LH_MODE}" = "ubuntu" ]
+ then
+ if [ "${LH_BINARY_IMAGES}" = "usb-hdd" ]
+ then
+ LH_BOOTAPPEND_INSTALL="cdrom-detect/try-usb=true --
\${LH_BOOTAPPEND_LIVE}"
+ fi
+ fi
+
i'd go for
if [ "${LH_MODE}" = "ubuntu" ] && [ "${LH_BINARY_IMAGES}" = "usb-hdd" ]
until other hacks are required.
# Setting encryption
LH_ENCRYPTION="${LH_ENCRYPTION:-disabled}"
@@ -657,7 +747,15 @@ Set_defaults ()
# Setting hostname
if [ -z "${LH_HOSTNAME}" ]
then
- LH_HOSTNAME="debian"
+ case "${LH_MODE}" in
+ ubuntu)
+ LH_HOSTNAME="ubuntu"
+ ;;
+
+ *)
+ LH_HOSTNAME="debian"
+ ;;
+ esac
fi
which is actually feels wrong, not on your side though. it should also
cover emdebian as distinctive case (and not set the hostname to debian
there as well).
Please adjust above things, then i'll apply it.
--
Address: Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email: daniel.baumann@panthera-systems.net
Internet: http://people.panthera-systems.net/~daniel-baumann/
Reply to: