From 7224c1253228e5c29c78cb3f0f26ce34770f2356 Mon Sep 17 00:00:00 2001 From: BlackNoxis Date: Sat, 15 Feb 2014 23:24:26 +0200 Subject: Added ebuilds for kogaion desktop --- app-misc/rogentoslive-tools/files/1.0/net-setup | 65 +++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100755 app-misc/rogentoslive-tools/files/1.0/net-setup (limited to 'app-misc/rogentoslive-tools/files/1.0/net-setup') diff --git a/app-misc/rogentoslive-tools/files/1.0/net-setup b/app-misc/rogentoslive-tools/files/1.0/net-setup new file mode 100755 index 00000000..e84de48b --- /dev/null +++ b/app-misc/rogentoslive-tools/files/1.0/net-setup @@ -0,0 +1,65 @@ +#!/bin/bash +# Copyright 1999-2005 Gentoo Foundation +# Copyright 2006-2008 Fabio Erculiani +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo/src/livecd-tools/net-setup,v 1.19 2006/05/30 20:20:11 wolf31o2 Exp $ + +if [ -f /sbin/livecd-functions.sh ] +then + source /sbin/livecd-functions.sh +else + echo "ERROR: /sbin/livecd-functions.sh could not be loaded!" + exit 1 +fi + +if [ ! -x $(which dialog) ] +then + echo "ERROR: The dialog utility is required for net-setup. Exiting!" + exit 1 +fi + +livecd_check_root || exit 1 + +# Hide any potential error messages from the readlink/dirname/etc calls below +exec 2>/dev/null + +if [ -z "${1}" ] +then + show_ifmenu + echo $iface +else + iface="${1}" +fi + +[ ! -d /tmp/setup.opts ] && mkdir /tmp/setup.opts +cd /tmp/setup.opts + +while true; do + show_ifconfirm $iface + [[ $result == "yes" ]] && break + show_ifmenu +done + +# Show stderr again +exec 2>/dev/stderr + +dialog --title "Network setup" --menu "This script is designed to setup both wired and wireless network settings. All questions below apply to the ${iface} interface only. Choose one option:" 20 60 7 1 "My network is wireless" 2 "My network is wired" 2> ${iface}.WIRED_WIRELESS +WIRED_WIRELESS=$(tail -n 1 ${iface}.WIRED_WIRELESS) +case ${WIRED_WIRELESS} in + 1) + livecd_config_wireless + livecd_config_ip + livecd_write_wireless_conf + ;; + 2) + livecd_config_ip + ;; + *) + exit 0 + ;; +esac +livecd_write_net_conf + +echo "Type \"ifconfig\" to make sure the interface was configured correctly." + +# vim: ts=4 -- cgit v1.2.3