add copyright, fix arch
[automated-distro-installer] / arch-init-chroot
index abd9a08ae8c3cc67abbf9e2cf6caa21ad37fa76e..7eac7ebe3e08c483b68bd3c4fd986c4747632128 100755 (executable)
@@ -1,4 +1,19 @@
 #!/bin/bash -x
+# Copyright (C) 2016 Ian Kelling
+
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 set -eE -o pipefail
 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
 
@@ -124,7 +139,7 @@ usermod -aG games,rfkill,users,uucp,wheel ian
 
 pacman -S --noconfirm net-tools # for route
 # get the mac of the interface used by the broadcast route.
-mac=$(cat /sys/class/net/$(route -n | sed -rn --follow-symlinks 's/^0\.0\.0\.0.*[[:space:]]([^[:space:]]+)[[:space:]]*$/\1/p')/address)
+mac=$(cat /sys/class/net/$(route -n | sed -rn 's/^0\.0\.0\.0.*[[:space:]]([^[:space:]]+)[[:space:]]*$/\1/p')/address)
 
 
 # simple bridge.