Package: fai-client Version: 4.3.1 Severity: normal
Hi, When saving log files remotely back to the FAI server, the path it attempts to save to is mangled and invalid. The last few lines of my FAI install: ....... Ramdisk on /target/var/lib/dpkg umounted Removing 'diversion of /usr/sbin/policy-rc.d to /usr/sbin/policy-rc.d.distrib by fai' Removing 'diversion of /sbin/init to /sbin/init.distrib by fai' Removing 'diversion of /usr/sbin/liloconfig to /usr/sbin/liloconfig.distrib by fai' Removing 'diversion of /usr/sbin/invoke-rc.d to /usr/sbin/invoke-rc.d.distrib by fai' Thu Dec 4 15:02:37 CST 2014 The install took 353 seconds. Calling task_chboot The authenticity of host '192.168.1.100 (192.168.1.100)' can't be established. RSA key fingerprint is 2f:5c:db:e1:fa:4b:12:5b:b5:ee:5c:93:4a:ef:8c:f1. Are you sure you want to continue connecting (yes/no)? yes 192.168.1.110 (0A02026E) is not enabled Source hook: savelog.LAST.source ERRORS found in log files. See /tmp/fai/error.log savelog.LAST.source OK. Calling task_savelog Save log files via ssh to [email protected]:/var/log/fai/myserver01//install-20141204_145650 The authenticity of host '192.168.1.100 (192.168.1.100)' can't be established. RSA key fingerprint is 96:12:7f:ed:fe:91:bf:11:91:7d:7e:07:55:13:3d:2a. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.1.100' (RSA) to the list of known hosts. Calling task_faiend Press <RETURN> to reboot (do not remove your removable medium yet). ...... Looks like this is being caused by a trailing slash in the assignment of the thislogdir= variable in fai-savelog. Relevant lines of the script: 56 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 57 save_log_remote_shell() { 58 59 local thislogdir 60 if [ -n "$LOGREMOTEDIR" ]; then 61 thislogdir=$LOGREMOTEDIR/$HOSTNAME/ 62 else 63 thislogdir=$HOSTNAME/ 64 fi 65 66 local thislog 67 thislog=$thislogdir/$FAI_ACTION-$fai_rundate If LOGREMOTEDIR is set to /var/log/fai, line 63 then expands to thislog=/var/log/fai/myserver01/ Line 67 then appends another slash, and assuming an FAI_ACTION of "install", it makes the path /var/log/fai/myserver01//install-20141204 Changing Lines 61 and 63 to thislogdir=$LOGREMOTEDIR/$HOSTNAME and thislogdir=$HOSTNAME ought to fix the issue. Thanks! Kevin Newman Linux Systems Administrator [cid:[email protected]] 141 W. Jackson Blvd. Suite 500 Chicago, IL 60604 ______________________________________________ See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email

