Ticket #818 (closed enhancement: fixed)
Run athinfod during the install
Reported by: | geofft | Owned by: | jdreed |
---|---|---|---|
Priority: | normal | Milestone: | The Distant Future |
Component: | -- | Keywords: | |
Cc: | Fixed in version: | ||
Upstream bug: |
Description
#817 and the fact that thumbdrives plugged in during a PXE install can cause strange things to happen reminded me that we do want athinfod running during the install, with at least a query to track install progress.
This would involve
- figuring out what athinfo queries are reasonable to want during debian-installer (much of the hardware stuff is probably reasonable)
- building debathena-athinfod-udeb, with as few Debathena deps as possible
- picking up that udeb early in the install process
- logging the output of install-debathena.sh (which I think we already do, actually)
There's also probably an argument for running athinfod in install-debathena.sh if you're installing workstation, but I'm not immediately convinced.
Change History
comment:2 Changed 13 years ago by jdreed
- Owner set to jdreed
- Status changed from new to accepted
Geoff pointed me at httpd from the save-logs udeb, whose source is in the installation-report package. I propose we copy that and implement our athinfod in shell. Building a udeb, in addition to being yet another thing we need to do, requires that anna be functional. We actually do a bunch of things long before anna is functional. wget, however, is functional that early in the install. Here's my proposed script. Note that nc is traditional netcat, not openbsd netcat.
#!/bin/sh # # The idea of using netcat as a lightweight inetd was inspired by the # "httpd" script in the "save-logs" in the "installation-report" # package, which is licensed under GPLv2 (as of # installation-report-2.44ubuntu1, which was current when this was # written). This script is, therefore, licensed under GPLv2. The # license of athinfod itself is unaffected by this. PORT=49155 DOCROOT=/var/log run_nc () { nc -p $PORT -l -e $1 </dev/null >/dev/null 2>/dev/null & } if [ -z "$ATHINFOD_STARTED" ]; then [ -f /var/lib/athinfod_stop ] && exit ATHINFOD_STARTED=1 export ATHINFOD_STARTED # daemonize run_nc $0 exit else # start up the next listener process [ -f /var/lib/athinfod_stop ] || run_nc $0 fi read query query="$(echo "$query" | sed 's/[^-.A-Za-z0-9_]//g')" # untaint case "$query" in version) echo "Installation in progress" ;; uname) uname -a ;; preseed) cat /debathena/preseed ;; syslog) cat /var/log/syslog ;; *) [ "$query" != "queries" ] && echo "Unknown query" cat <<EOF version echo "Installation in progress" uname uname -a preseed cat /debathena/preseed syslog cat /var/log/syslog EOF esac exit 0
comment:3 Changed 13 years ago by jdreed
Hearing no objections, I committed r25367 (this code does nothing until wgotten (deal with it) by the installer). Having no workflow for the PXE installer, I'm planning on committing the necessary installer changes in about a week, and deploying them shortly after that.
This also involves rebuilding athinfod to not use inetd (because, AFAICT, there's no inetd udeb). We don't actually need real athinfo, either -- we can hardcode a list of queries.