aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiam McLoughlin <hexxeh@hexxeh.net>2011-08-02 17:48:28 +0100
committerLiam McLoughlin <hexxeh@hexxeh.net>2011-08-02 18:09:15 +0100
commit39197c305474df0332f150388a404f698d24b685 (patch)
tree2a172a5493e28c83a65ff637196bdd3f9d49f575
parentAdd more drivers to XFCE config, fix some cachedkernel logic (diff)
downloadgentoaster-39197c305474df0332f150388a404f698d24b685.tar.gz
gentoaster-39197c305474df0332f150388a404f698d24b685.tar.bz2
gentoaster-39197c305474df0332f150388a404f698d24b685.zip
Keyboard layout support for build tool, Stage3/Portage/BINHOST override from config files
-rw-r--r--configs/fluxbox.ini1
-rw-r--r--configs/minimal.ini1
-rw-r--r--configs/xfce.ini1
-rwxr-xr-xcreate_image.sh38
-rw-r--r--daemon.php2
-rw-r--r--res/keyboard.lst184
6 files changed, 121 insertions, 106 deletions
diff --git a/configs/fluxbox.ini b/configs/fluxbox.ini
index f199237..409ec8b 100644
--- a/configs/fluxbox.ini
+++ b/configs/fluxbox.ini
@@ -5,6 +5,7 @@ BOOT_MEGABYTES='64'
SWAP_MEGABYTES='128'
ROOT_MEGABYTES='7999'
TIMEZONE='Europe/London'
+KEYBOARD='gb'
HOSTNAME='gentoo'
ROOT_PASSWORD='g3nt00'
DEFAULT_USERNAME='gentoo'
diff --git a/configs/minimal.ini b/configs/minimal.ini
index 0d7eed6..f841cc2 100644
--- a/configs/minimal.ini
+++ b/configs/minimal.ini
@@ -5,6 +5,7 @@ BOOT_MEGABYTES='64'
SWAP_MEGABYTES='128'
ROOT_MEGABYTES='3903'
TIMEZONE='Europe/London'
+KEYBOARD='gb'
HOSTNAME='gentoo'
ROOT_PASSWORD='g3nt00'
DEFAULT_USERNAME='gentoo'
diff --git a/configs/xfce.ini b/configs/xfce.ini
index 6c249ee..60ce144 100644
--- a/configs/xfce.ini
+++ b/configs/xfce.ini
@@ -5,6 +5,7 @@ BOOT_MEGABYTES='64'
SWAP_MEGABYTES='128'
ROOT_MEGABYTES='16190'
TIMEZONE='Europe/London'
+KEYBOARD='gb'
HOSTNAME='gentoo'
ROOT_PASSWORD='g3nt00'
DEFAULT_USERNAME='gentoo'
diff --git a/create_image.sh b/create_image.sh
index 2da2d6f..3858dac 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -52,11 +52,20 @@ LOG_FILE="${IMAGE_WORK_PATH}/log.txt"
TOOL_RES_PATH=${RUNNING_DIRECTORY}/res
NUM_JOBS=$(( `grep -c processor /proc/cpuinfo`+1 ))
-STAGE3_URL="http://distribution.hexxeh.net/gentoo/stage3-i686-latest.tar.bz2"
-PORTAGE_URL="http://distribution.hexxeh.net/gentoo/portage-latest.tar.bz2"
-BINHOST_URL="http://tinderbox.dev.gentoo.org/default-linux/x86"
EMERGE_PROXY="${FLAGS_proxy}"
+if [ -z ${STAGE3_URL} ]; then
+ STAGE3_URL="http://distribution.hexxeh.net/gentoo/stage3-i686-latest.tar.bz2"
+fi
+
+if [ -z ${PORTAGE_URL} ]; then
+ PORTAGE_URL="http://distribution.hexxeh.net/gentoo/portage-latest.tar.bz2"
+fi
+
+if [ -z ${BINHOST_URL} ]; then
+ BINHOST_URL="http://tinderbox.dev.gentoo.org/default-linux/x86"
+fi
+
# Clean up old mounts
cleanup_mounts() {
sleep 2
@@ -191,19 +200,22 @@ linux32 chroot . /bin/bash /etc/profile &>> ${LOG_FILE}
echo "Step 13: Setting timezone to ${TIMEZONE}"
linux32 chroot . cp /usr/share/zoneinfo/${TIMEZONE} /etc/localtime &>> ${LOG_FILE}
-echo "Step 14: Setting hostname to ${HOSTNAME}"
+echo "Step 14: Setting keyboard layout to ${KEYBOARD}"
+linux32 chroot . sed -i -e "s/keymap=.*/keymap=\"${KEYBOARD}\"/" /etc/conf.d/keymaps &>> ${LOG_FILE}
+
+echo "Step 15: Setting hostname to ${HOSTNAME}"
linux32 chroot . /bin/bash -c "echo hostname='${HOSTNAME}' > /etc/conf.d/hostname" &>> ${LOG_FILE}
linux32 chroot . /bin/bash -c "echo 127.0.0.1 ${HOSTNAME}.local ${HOSTNAME} localhost > /etc/hosts" &>> ${LOG_FILE}
-echo "Step 15: Copying new fstab"
+echo "Step 16: Copying new fstab"
cp ${TOOL_RES_PATH}/fstab etc/fstab &>> ${LOG_FILE}
-echo "Step 16: Setting up networking"
+echo "Step 17: Setting up networking"
echo 'config_eth0=( "dhcp" )' > etc/conf.d/net
cp etc/init.d/net.lo etc/init.d/net.eth0
linux32 chroot . rc-update add net.eth0 default &>> ${LOG_FILE}
-echo "Step 17: Setting up kernel"
+echo "Step 18: Setting up kernel"
# If we got the flag, used a cached kernel to reduce build times for testing
if [[ ${FLAGS_cachedkernel} -eq ${FLAGS_TRUE} ]]; then
echo "Using cached kernel" &>> ${LOG_FILE}
@@ -227,16 +239,16 @@ else
cp usr/src/linux/arch/i386/boot/bzImage boot/kernel &>> ${LOG_FILE} || handle_error "Error copying kernel"
fi
-echo "Step 18: Setting root password"
+echo "Step 19: Setting root password"
linux32 chroot . /bin/bash -c "echo 'root:${ROOT_PASSWORD}' | chpasswd" &>> ${LOG_FILE} || handle_error "Error setting root password"
-echo "Step 19: Processing packages list"
+echo "Step 20: Processing packages list"
for PACKAGE in ${PACKAGES_LIST}; do
echo "Installing ${PACKAGE}" &>> ${LOG_FILE}
linux32 chroot . emerge --jobs=${NUM_JOBS} ${PACKAGE} &>> ${LOG_FILE} || handle_error "Error emerging ${PACKAGE}"
done
-echo "Step 20: Adding default user"
+echo "Step 21: Adding default user"
linux32 chroot . useradd -g users -G lp,wheel,audio,cdrom,portage -m ${DEFAULT_USERNAME} || handle_error "Error adding default user"
linux32 chroot . /bin/bash -c "echo '${DEFAULT_USERNAME}:${DEFAULT_PASSWORD}' | chpasswd" &>> ${LOG_FILE} || handle_error "Error setting default user password"
@@ -249,13 +261,13 @@ then
linux32 chroot . usermod -a vboxguest ${DEFAULT_USERNAME}
fi
-echo "Step 21: Cleaning up make.conf"
+echo "Step 22: Cleaning up make.conf"
if [ -n ${EMERGE_PROXY} ]; then
sed -i '/http_proxy/ d' etc/make.conf
fi
sed -i '/MAKEOPTS/ d' etc/make.conf
-echo "Step 22: Installing extlinux"
+echo "Step 23: Installing extlinux"
extlinux --heads 255 --sectors 63 --install boot &>> ${LOG_FILE} || handle_error "Error installing extlinux"
dd if=/usr/lib/extlinux/mbr.bin of=../${IMAGE_NAME} conv=notrunc &>> ${LOG_FILE} || handle_error "Error copying extlinux MBR"
cp ${TOOL_RES_PATH}/extlinux.conf boot/ || handle_error "Error copying extlinux configuration"
@@ -291,6 +303,6 @@ if [[ ${FLAGS_compress} -eq ${FLAGS_TRUE} ]]; then
IMAGE_OUT="${BUILD_ID}.tar.gz"
fi
-echo "Step 23: Image build completed!"
+echo "Step 24: Image build completed!"
echo "Your image is here: ${IMAGES_OUTPUT_PATH}/${IMAGE_OUT}"
echo "Your log file is here: ${IMAGES_OUTPUT_PATH}/${BUILD_ID}.log"
diff --git a/daemon.php b/daemon.php
index 6704053..65d7d2b 100644
--- a/daemon.php
+++ b/daemon.php
@@ -53,7 +53,7 @@
function image_build($job)
{
- $progressMagic = 23;
+ $progressMagic = 24;
$handle = $job->handle();
$handlehash = md5($handle);
diff --git a/res/keyboard.lst b/res/keyboard.lst
index 61ed3b2..076ae13 100644
--- a/res/keyboard.lst
+++ b/res/keyboard.lst
@@ -1,92 +1,92 @@
- us United States
- ad Andorra
- af Afghanistan
- ara Arabic
- al Albania
- am Armenia
- at Austria
- az Azerbaijan
- by Belarus
- be Belgium
- bd Bangladesh
- in India
- ba Bosnia and Herzegovina
- br Brazil
- bg Bulgaria
- ma Morocco
- mm Myanmar
- ca Canada
- cd Congo, Democratic Republic of the
- cn China
- hr Croatia
- cz Czechia
- dk Denmark
- nl Netherlands
- bt Bhutan
- ee Estonia
- ir Iran
- iq Iraq
- fo Faroe Islands
- fi Finland
- fr France
- gh Ghana
- gn Guinea
- ge Georgia
- de Germany
- gr Greece
- hu Hungary
- is Iceland
- il Israel
- it Italy
- jp Japan
- kg Kyrgyzstan
- kh Cambodia
- kz Kazakhstan
- la Laos
- latam Latin American
- lt Lithuania
- lv Latvia
- mao Maori
- me Montenegro
- mk Macedonia
- mt Malta
- mn Mongolia
- no Norway
- pl Poland
- pt Portugal
- ro Romania
- ru Russia
- rs Serbia
- si Slovenia
- sk Slovakia
- es Spain
- se Sweden
- ch Switzerland
- sy Syria
- tj Tajikistan
- lk Sri Lanka
- th Thailand
- tr Turkey
- tw Taiwan
- ua Ukraine
- gb United Kingdom
- uz Uzbekistan
- vn Vietnam
- kr Korea, Republic of
- nec_vndr/jp Japan (PC-98xx Series)
- ie Ireland
- pk Pakistan
- mv Maldives
- za South Africa
- epo Esperanto
- np Nepal
- ng Nigeria
- et Ethiopia
- sn Senegal
- brai Braille
- tm Turkmenistan
- ml Mali
- tz Tanzania
- ke Kenya
- bw Botswana
- ph Philippines
+us United States
+ad Andorra
+af Afghanistan
+ara Arabic
+al Albania
+am Armenia
+at Austria
+az Azerbaijan
+by Belarus
+be Belgium
+bd Bangladesh
+in India
+ba Bosnia and Herzegovina
+br Brazil
+bg Bulgaria
+ma Morocco
+mm Myanmar
+ca Canada
+cd Congo, Democratic Republic of the
+cn China
+hr Croatia
+cz Czechia
+dk Denmark
+nl Netherlands
+bt Bhutan
+ee Estonia
+ir Iran
+iq Iraq
+fo Faroe Islands
+fi Finland
+fr France
+gh Ghana
+gn Guinea
+ge Georgia
+de Germany
+gr Greece
+hu Hungary
+is Iceland
+il Israel
+it Italy
+jp Japan
+kg Kyrgyzstan
+kh Cambodia
+kz Kazakhstan
+la Laos
+latam Latin American
+lt Lithuania
+lv Latvia
+mao Maori
+me Montenegro
+mk Macedonia
+mt Malta
+mn Mongolia
+no Norway
+pl Poland
+pt Portugal
+ro Romania
+ru Russia
+rs Serbia
+si Slovenia
+sk Slovakia
+es Spain
+se Sweden
+ch Switzerland
+sy Syria
+tj Tajikistan
+lk Sri Lanka
+th Thailand
+tr Turkey
+tw Taiwan
+ua Ukraine
+gb United Kingdom
+uz Uzbekistan
+vn Vietnam
+kr Korea, Republic of
+nec_vndr/jp Japan (PC-98xx Series)
+ie Ireland
+pk Pakistan
+mv Maldives
+za South Africa
+epo Esperanto
+np Nepal
+ng Nigeria
+et Ethiopia
+sn Senegal
+brai Braille
+tm Turkmenistan
+ml Mali
+tz Tanzania
+ke Kenya
+bw Botswana
+ph Philippines