summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2011-08-03 18:49:13 +0200
committerDieter Plaetinck <dieter@plaetinck.be>2011-08-03 18:49:13 +0200
commit3708f751e3b3d2f4a2cd852d2da31d26eb93feac (patch)
tree085639f7fc4d85f148b1ec38e3aa9328c28e60e1
parent1146b9e13b0db8d8d4c0d52c155a64b56eb37a78 (diff)
parent9eeb6d3ad98a52c25684ca022a659b29153ede9f (diff)
Merge branch 'master' into develop
-rw-r--r--src/core/libs/lib-network.sh54
-rw-r--r--src/core/libs/lib-software.sh2
-rw-r--r--src/core/libs/lib-ui-interactive.sh8
3 files changed, 28 insertions, 36 deletions
diff --git a/src/core/libs/lib-network.sh b/src/core/libs/lib-network.sh
index 03d5361..3e7914b 100644
--- a/src/core/libs/lib-network.sh
+++ b/src/core/libs/lib-network.sh
@@ -8,52 +8,44 @@ target_configure_network()
{
# networking setup could have happened in a separate process (eg partial-configure-network),
# so check if the settings file was created to be sure
- if [ -f $RUNTIME_DIR/aif-network-settings ]; then
+ if [[ -f "$RUNTIME_DIR/aif-network-settings" ]]; then
debug NETWORK "Configuring network settings on target system according to installer settings"
- source $RUNTIME_DIR/aif-network-settings 2>/dev/null || return 1
+ source "$RUNTIME_DIR/aif-network-settings" 2>/dev/null || return 1
- IFO=${INTERFACE_PREV:-eth0} # old iface: a previously entered one, or the arch default
IFN=${INTERFACE:-eth0} # new iface: a specified one, or the arch default
- # comment out any existing uncommented entries, whether specified by us, or arch defaults.
- for var in eth0 $IFO INTERFACES gateway ROUTES
- do
- sed -i "s/^$var=/#$var=/" ${var_TARGET_DIR}/etc/rc.conf || return 1
- done
- sed -i "s/^nameserver/#nameserver/" ${var_TARGET_DIR}/etc/resolv.conf || return 1
- if [ -f ${var_TARGET_DIR}/etc/profile.d/proxy.sh ]
- then
- sed -i "s/^export/#export/" ${var_TARGET_DIR}/etc/profile.d/proxy.sh || return 1
+ sed -i "s/^nameserver/#nameserver/" "${var_TARGET_DIR}/etc/resolv.conf" || return 1
+ if [[ -f "${var_TARGET_DIR}/etc/profile.d/proxy.sh" ]]; then
+ sed -i "s/^export/#export/" "${var_TARGET_DIR}/etc/profile.d/proxy.sh" || return 1
fi
- if [ "$DHCP" = 0 ] ; then
- local line="$IFN=\"$IFN ${IPADDR:-192.168.0.2} netmask ${SUBNET:-255.255.255.0} broadcast ${BROADCAST:-192.168.0.255}\""
- append_after_last "/$IFO\|eth0/" "$line" ${var_TARGET_DIR}/etc/rc.conf || return 1
+ sed -i "s/^\(interface\)=/\1=$IFN/" "${var_TARGET_DIR}/etc/rc.conf" || return 1
+ if (( ! DHCP )); then
+ sed -i "s/^\(address\)=/\1=$IPADDR/;s/^\(netmask\)=/\1=$SUBNET/" "${var_TARGET_DIR}/etc/rc.conf"
- if [ -n "$GW" ]; then
- append_after_last "/gateway/" "gateway=\"default gw $GW\"" ${var_TARGET_DIR}/etc/rc.conf || return 1
- append_after_last "/ROUTES/" "ROUTES=(gateway)" ${var_TARGET_DIR}/etc/rc.conf || return 1
+ if [[ $BROADCAST ]]; then
+ sed -i "s/^\(broadcast\)=/\1=$BROADCAST/" "${var_TARGET_DIR}/etc/rc.conf" || return 1
fi
- if [ -n "$DNS" ]
- then
- echo "nameserver $DNS" >> ${var_TARGET_DIR}/etc/resolv.conf || return 1
+
+ if [[ $GW ]]; then
+ sed -i "s/^\(gateway\)=/\1=$GW/" "${var_TARGET_DIR}/etc/rc.conf" || return 1
fi
- else
- append_after_last "/$IFO\|eth0/" "$IFN=\"dhcp\"" ${var_TARGET_DIR}/etc/rc.conf || return 1
- fi
- append_after_last "/$IFO\|eth0/" "INTERFACES=($IFN)" ${var_TARGET_DIR}/etc/rc.conf || return 1
+ if [[ $DNS ]]; then
+ echo "nameserver $DNS" >> "${var_TARGET_DIR}/etc/resolv.conf" || return 2
+ fi
+ fi
- if [ -n "$PROXY_HTTP" ]; then
- echo "export http_proxy=$PROXY_HTTP" >> ${var_TARGET_DIR}/etc/profile.d/proxy.sh || return 1
- chmod a+x ${var_TARGET_DIR}/etc/profile.d/proxy.sh || return 1
+ if [[ $PROXY_HTTP ]]; then
+ echo "export http_proxy=$PROXY_HTTP" >> "${var_TARGET_DIR}/etc/profile.d/proxy.sh" || return 1
+ chmod a+x "${var_TARGET_DIR}/etc/profile.d/proxy.sh" || return 1
fi
- if [ -n "$PROXY_FTP" ]; then
- echo "export ftp_proxy=$PROXY_FTP" >> ${var_TARGET_DIR}/etc/profile.d/proxy.sh || return 1
- chmod a+x ${var_TARGET_DIR}/etc/profile.d/proxy.sh || return 1
+ if [[ $PROXY_FTP ]]; then
+ echo "export ftp_proxy=$PROXY_FTP" >> "${var_TARGET_DIR}/etc/profile.d/proxy.sh" || return 1
+ chmod a+x "${var_TARGET_DIR}/etc/profile.d/proxy.sh" || return 1
fi
else
debug NETWORK "Skipping Host Network Configuration - aif-network-settings not found"
diff --git a/src/core/libs/lib-software.sh b/src/core/libs/lib-software.sh
index 3ff8305..17102bb 100644
--- a/src/core/libs/lib-software.sh
+++ b/src/core/libs/lib-software.sh
@@ -8,7 +8,7 @@ target_run_mkinitcpio()
{
target_special_fs on
- run_controlled mkinitcpio "chroot $var_TARGET_DIR /sbin/mkinitcpio -p kernel26" $TMP_MKINITCPIO_LOG "Rebuilding initcpio images ..."
+ run_controlled mkinitcpio "chroot $var_TARGET_DIR /sbin/mkinitcpio -p linux" $TMP_MKINITCPIO_LOG "Rebuilding initcpio images ..."
target_special_fs off
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh
index 05dd234..1ae4d6f 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -1087,14 +1087,14 @@ generate_grub_menulst() {
# (0) Arch Linux
title Arch Linux
root $grubdev
-kernel $subdir/vmlinuz26 $kernel_parameters
-initrd $subdir/kernel26.img
+kernel $subdir/vmlinuz-linux $kernel_parameters
+initrd $subdir/initramfs-linux.img
# (1) Arch Linux
title Arch Linux Fallback
root $grubdev
-kernel $subdir/vmlinuz26 $kernel_parameters
-initrd $subdir/kernel26-fallback.img
+kernel $subdir/vmlinuz-linux $kernel_parameters
+initrd $subdir/initramfs-linux-fallback.img
# (2) Windows
#title Windows