diff options
| -rw-r--r-- | Reaktor/elchos/admin.lst (renamed from elchos/root-image/krebs/etc/Reaktor/elchos/admin.lst) | 0 | ||||
| -rw-r--r-- | Reaktor/elchos/auth.lst (renamed from elchos/root-image/krebs/etc/Reaktor/elchos/auth.lst) | 0 | ||||
| -rwxr-xr-x | Reaktor/elchos/commands/ftpget (renamed from elchos/root-image/krebs/etc/Reaktor/elchos/commands/ftpget) | 0 | ||||
| -rwxr-xr-x | Reaktor/elchos/commands/identify (renamed from elchos/root-image/krebs/etc/Reaktor/elchos/commands/identify) | 0 | ||||
| -rwxr-xr-x | Reaktor/elchos/commands/io (renamed from elchos/root-image/krebs/etc/Reaktor/elchos/commands/io) | 0 | ||||
| -rwxr-xr-x | Reaktor/elchos/commands/ips (renamed from elchos/root-image/krebs/etc/Reaktor/elchos/commands/ips) | 0 | ||||
| -rwxr-xr-x | Reaktor/elchos/commands/list_downloads (renamed from elchos/root-image/krebs/etc/Reaktor/elchos/commands/list_downloads) | 0 | ||||
| -rwxr-xr-x | Reaktor/elchos/commands/onion (renamed from elchos/root-image/krebs/etc/Reaktor/elchos/commands/onion) | 0 | ||||
| -rwxr-xr-x | Reaktor/elchos/commands/reboot (renamed from elchos/root-image/krebs/etc/Reaktor/elchos/commands/reboot) | 0 | ||||
| -rwxr-xr-x | Reaktor/elchos/commands/refresh_shares (renamed from elchos/root-image/krebs/etc/Reaktor/elchos/commands/refresh_shares) | 0 | ||||
| -rwxr-xr-x | Reaktor/elchos/commands/shares (renamed from elchos/root-image/krebs/etc/Reaktor/elchos/commands/shares) | 0 | ||||
| -rwxr-xr-x | Reaktor/elchos/commands/update_search (renamed from elchos/root-image/krebs/etc/Reaktor/elchos/commands/update_search) | 0 | ||||
| -rw-r--r-- | Reaktor/elchos/config.py (renamed from elchos/root-image/krebs/etc/Reaktor/elchos/config.py) | 7 | ||||
| -rw-r--r-- | elchos/INSTALL | 1 | ||||
| -rwxr-xr-x | elchos/root-image/krebs/bin/refresh-shares.ship | 2 | ||||
| -rwxr-xr-x | elchos/root-image/krebs/bin/start-ncdc.ship | 7 | ||||
| -rw-r--r-- | elchos/root-image/krebs/config.sh | 2 | ||||
| -rw-r--r-- | elchos/root-image/krebs/lib/filehooker | 2 | ||||
| -rwxr-xr-x | elchos/root-image/root/customize_root_image.sh | 9 | 
19 files changed, 18 insertions, 12 deletions
| diff --git a/elchos/root-image/krebs/etc/Reaktor/elchos/admin.lst b/Reaktor/elchos/admin.lst index e69de29b..e69de29b 100644 --- a/elchos/root-image/krebs/etc/Reaktor/elchos/admin.lst +++ b/Reaktor/elchos/admin.lst diff --git a/elchos/root-image/krebs/etc/Reaktor/elchos/auth.lst b/Reaktor/elchos/auth.lst index e69de29b..e69de29b 100644 --- a/elchos/root-image/krebs/etc/Reaktor/elchos/auth.lst +++ b/Reaktor/elchos/auth.lst diff --git a/elchos/root-image/krebs/etc/Reaktor/elchos/commands/ftpget b/Reaktor/elchos/commands/ftpget index 74e76f8e..74e76f8e 100755 --- a/elchos/root-image/krebs/etc/Reaktor/elchos/commands/ftpget +++ b/Reaktor/elchos/commands/ftpget diff --git a/elchos/root-image/krebs/etc/Reaktor/elchos/commands/identify b/Reaktor/elchos/commands/identify index c2fb2c58..c2fb2c58 100755 --- a/elchos/root-image/krebs/etc/Reaktor/elchos/commands/identify +++ b/Reaktor/elchos/commands/identify diff --git a/elchos/root-image/krebs/etc/Reaktor/elchos/commands/io b/Reaktor/elchos/commands/io index eb04ae9b..eb04ae9b 100755 --- a/elchos/root-image/krebs/etc/Reaktor/elchos/commands/io +++ b/Reaktor/elchos/commands/io diff --git a/elchos/root-image/krebs/etc/Reaktor/elchos/commands/ips b/Reaktor/elchos/commands/ips index 17c39658..17c39658 100755 --- a/elchos/root-image/krebs/etc/Reaktor/elchos/commands/ips +++ b/Reaktor/elchos/commands/ips diff --git a/elchos/root-image/krebs/etc/Reaktor/elchos/commands/list_downloads b/Reaktor/elchos/commands/list_downloads index f53067d8..f53067d8 100755 --- a/elchos/root-image/krebs/etc/Reaktor/elchos/commands/list_downloads +++ b/Reaktor/elchos/commands/list_downloads diff --git a/elchos/root-image/krebs/etc/Reaktor/elchos/commands/onion b/Reaktor/elchos/commands/onion index 1a202991..1a202991 100755 --- a/elchos/root-image/krebs/etc/Reaktor/elchos/commands/onion +++ b/Reaktor/elchos/commands/onion diff --git a/elchos/root-image/krebs/etc/Reaktor/elchos/commands/reboot b/Reaktor/elchos/commands/reboot index a264831a..a264831a 100755 --- a/elchos/root-image/krebs/etc/Reaktor/elchos/commands/reboot +++ b/Reaktor/elchos/commands/reboot diff --git a/elchos/root-image/krebs/etc/Reaktor/elchos/commands/refresh_shares b/Reaktor/elchos/commands/refresh_shares index 1005998b..1005998b 100755 --- a/elchos/root-image/krebs/etc/Reaktor/elchos/commands/refresh_shares +++ b/Reaktor/elchos/commands/refresh_shares diff --git a/elchos/root-image/krebs/etc/Reaktor/elchos/commands/shares b/Reaktor/elchos/commands/shares index 1601d584..1601d584 100755 --- a/elchos/root-image/krebs/etc/Reaktor/elchos/commands/shares +++ b/Reaktor/elchos/commands/shares diff --git a/elchos/root-image/krebs/etc/Reaktor/elchos/commands/update_search b/Reaktor/elchos/commands/update_search index 1db1c1b2..1db1c1b2 100755 --- a/elchos/root-image/krebs/etc/Reaktor/elchos/commands/update_search +++ b/Reaktor/elchos/commands/update_search diff --git a/elchos/root-image/krebs/etc/Reaktor/elchos/config.py b/Reaktor/elchos/config.py index a850b7ae..eeeacd83 100644 --- a/elchos/root-image/krebs/etc/Reaktor/elchos/config.py +++ b/Reaktor/elchos/config.py @@ -1,12 +1,15 @@  import socket  name = socket.gethostname() -source = "/krebs/config.sh" +cfg_file = "/krebs/config.sh"  # TODO: shell config file cannot contain variables or anything fancy  ret ={} + +import shlex +## load config file, lex split every line, split at =  with open(cfg_file) as f:      for line in f: -        k,v = line.split("=") +        k,v = shlex.split(line)[0].split("=",1)          ret[k] = v  #irc_server = 'irc.freenode.net' diff --git a/elchos/INSTALL b/elchos/INSTALL new file mode 100644 index 00000000..54eb35a5 --- /dev/null +++ b/elchos/INSTALL @@ -0,0 +1 @@ +pacman -S extra/archiso diff --git a/elchos/root-image/krebs/bin/refresh-shares.ship b/elchos/root-image/krebs/bin/refresh-shares.ship index 364d7758..46d15f46 100755 --- a/elchos/root-image/krebs/bin/refresh-shares.ship +++ b/elchos/root-image/krebs/bin/refresh-shares.ship @@ -4,7 +4,7 @@  set -euf  #@include filehooker  . /krebs/lib/filehooker -ncdc_user="hooker" +ncdc_user="elch"  share_all_partitions  systemctl restart hddtemp.service diff --git a/elchos/root-image/krebs/bin/start-ncdc.ship b/elchos/root-image/krebs/bin/start-ncdc.ship index 1d47bcfb..37d7cf45 100755 --- a/elchos/root-image/krebs/bin/start-ncdc.ship +++ b/elchos/root-image/krebs/bin/start-ncdc.ship @@ -3,7 +3,10 @@ set -euf  #@include filehooker  . /krebs/lib/filehooker  #@include network -ncdc_user="hooker" + +# load elch-config +. /krebs/config.sh +ncdc_user="elch"  useradd -m $ncdc_user ||: @@ -13,7 +16,7 @@ nick=$(cat /etc/hostname)  echo "using nick $nick"  ncdc_configure_nick "$nick"  sleep 1 -dc_hub="adcs://elchhub.nsupdate.info:2781" +dc_hub="$DC_HUB"  echo "connecting to $dc_hub"  ncdc_configure_hub "$dc_hub" "elch" diff --git a/elchos/root-image/krebs/config.sh b/elchos/root-image/krebs/config.sh index a2b4d202..33bdaa2b 100644 --- a/elchos/root-image/krebs/config.sh +++ b/elchos/root-image/krebs/config.sh @@ -1 +1,3 @@  IRC_SERVER=irc.freenode.net +STATS_SERVER=elchstats.nsupdate.info +DC_HUB="adcs://elchhub.nsupdate.info:2781" diff --git a/elchos/root-image/krebs/lib/filehooker b/elchos/root-image/krebs/lib/filehooker index b3bef435..7589ef8a 100644 --- a/elchos/root-image/krebs/lib/filehooker +++ b/elchos/root-image/krebs/lib/filehooker @@ -2,7 +2,7 @@  . /krebs/lib/core  #@include network  . /krebs/lib/network -ncdc_user=${ncdc_user:-hooker} +ncdc_user=${ncdc_user:-elch}  ncdc_bin=${ncdc_bin:-/usr/bin/ncdc} diff --git a/elchos/root-image/root/customize_root_image.sh b/elchos/root-image/root/customize_root_image.sh index 59166853..3233176c 100755 --- a/elchos/root-image/root/customize_root_image.sh +++ b/elchos/root-image/root/customize_root_image.sh @@ -2,7 +2,7 @@  set -e -u -f  reaktor_user=reaktor -ncdc_user=hooker +ncdc_user=elch  rootpw=$(dd if=/dev/urandom bs=1 count=100 2>/dev/null |md5sum | awk '{print $1}' | dd bs=1 count=9 2>/dev/null)  sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen  locale-gen @@ -53,15 +53,12 @@ echo "$reaktor_user ALL=(root) NOPASSWD: /krebs/bin/refresh-shares.ship" >> /etc  echo "$reaktor_user ALL=($ncdc_user) NOPASSWD: ALL" >> /etc/sudoers.d/reaktor  echo "$reaktor_user ALL=(root) NOPASSWD: /usr/bin/reboot" >> /etc/sudoers.d/reaktor -# add bonus features for elch -cp -a /krebs/etc/Reaktor  /krebs/painload -  # emergency root passwd -printf "!!!!!!\nthe Root PW is '%s'\n!!!!!!\n"  "$rootpw" +printf "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nthe Root PW is '%s'\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"  "$rootpw"  (printf "%s\n%s\n" "$rootpw" "$rootpw" ) | passwd  cd /krebs/painload/Reaktor/  touch auth.lst admin.lst -chown reaktor:reaktor auth.lst admin.lst +chown $reaktor_user:$reaktor_user auth.lst admin.lst  for i in  multi-user.target \                    pacman-init.service \                    choose-mirror.service \ | 
