Merge debian/changelog
[grml-autoconfig.git] / autoconfig.functions
index 13f32f0..c9e4ff5 100755 (executable)
@@ -10,6 +10,7 @@
 export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin"
 DEBUG="/dev/null"
 KERNEL="$(uname -r)"
+ARCH="$(uname -m)"
 umask 022
 
 # old linuxrc version:
@@ -1795,7 +1796,7 @@ config_services(){
 # {{{ remote files
 get_remote_file() {
   [ "$#" -eq 2 ] || ( echo "Error: wrong parameter for get_remote_file()" ; return 1 )
-  SOURCE="$1"
+  SOURCE=$(eval echo "$1")
   TARGET="$2"
   getconfig() {
   wget --timeout=10 --dns-timeout=10  --connect-timeout=10 --tries=1 \
@@ -1834,6 +1835,21 @@ config_netconfig(){
 }
 # }}}
 
+# {{{ remote scripts
+config_netscript() {
+ if checkbootparam 'netscript' ; then
+  CONFIG="$(getbootparam 'netscript' 2>>$DEBUG)"
+  SCRIPTFILE='/tmp/netscript.grml'
+
+  if get_remote_file ${CONFIG} ${SCRIPTFILE} ; then
+    chmod +x ${SCRIPTFILE}
+    einfo "Running ${WHITE}${SCRIPTFILE}${NORMAL}:" && ${SCRIPTFILE} ; eend $?
+  fi
+
+ fi
+}
+# }}}
+
 # {{{ blindsound
 config_blindsound(){
  if checkbootparam 'blind' ; then