diff --git a/fixups/S00-network b/fixups/S00-network index dd06fe9..eaa233e 100755 --- a/fixups/S00-network +++ b/fixups/S00-network @@ -5,3 +5,9 @@ mkdir -p $(dirname $(realpath -m /etc/resolv.conf)) cat>/etc/resolv.conf<<__EOF nameserver 127.0.0.53 __EOF + +if [ ! "x@@DEFAULT_LINUXFACTORY@@" = "x" ]; then + echo "@@DEFAULT_LINUXFACTORY@@ ppa.linuxfactory.or.kr" >> /etc/hosts +fi + +cat /etc/hosts diff --git a/functions b/functions index ed6b4ed..c29d936 100644 --- a/functions +++ b/functions @@ -439,6 +439,8 @@ do_preinstall() { DEFAULT_KERNEL_PACKAGE=$(get_kernel_package) [ ! "x${opt_kernel_package}" = "x" ] && DEFAULT_KERNEL_PACKAGE=${opt_kernel_package} + [ ! "x${opt_linuxfactory}" = "x" ] && DEFAULT_LINUXFACTORY=${opt_linuxfactory} + FIXUPS=`ls -A1 ${rootfs_mnt}${fixups_dir}/*` for fixup in ${FIXUPS}; do sed -i \ @@ -451,6 +453,7 @@ do_preinstall() { -e "s,@@DEFAULT_KERNEL_PACKAGE@@,${DEFAULT_KERNEL_PACKAGE},g" \ -e "s,@@DEFAULT_BOOTSCRIPT_PACKAGE@@,$(get_bootscript_package),g" \ -e "s,@@DEFAULT_MACHINE_NAME@@,$(get_machine_name),g" \ + -e "s,@@DEFAULT_LINUXFACTORY@@,${DEFAULT_LINUXFACTORY},g" \ -e "s,@@LINUX_KERNEL_CMDLINE@@,root=UUID=${UUID_ROOT} rootwait ro quiet,g" \ -e "s,@@LINUX_KERNEL_CMDLINE_DEFAULTS@@,$(get_kernel_cmdline_defaults),g" \ -e "s,@@DEFAULT_DEV_BOOT@@,${UUID_BOOT},g" \ diff --git a/odroid-stamper b/odroid-stamper index 64423ec..26c4d53 100755 --- a/odroid-stamper +++ b/odroid-stamper @@ -22,6 +22,7 @@ usage() { echo " --keep-builddir: prevent removing temporary directory" echo " after building an image." echo " --kernel: kernel package name to use" + echo " --linuxfactory: alternative server IP address of 'ppa.linuxfactory.or.kr'" exit 1 } @@ -47,6 +48,8 @@ for opt in "$@"; do --keep-builddir) opt_keep_builddir=true;; --kernel=*) opt_kernel_package="${opt#*=}";; + --linuxfactory=*) + opt_linuxfactory="${opt#*=}";; --custom=*) opt_custom="${opt#*=}";; --addon-wifi) opt_wifi=true;;