On 02/16/2012 06:36 AM, Daniel Veillard wrote:
>    Hi Lucas,
>
> may I just suggest to remove the -f16 on the file name, and to
> squash in the following patch to avoid problem on long partition names
> (like lvm ones) and also avoid a basename problem :-)

Daniel, thanks for the patch, applied:

https://github.com/autotest/autotest/commit/f11f8f7fe4c4687b1f64fe16acb9ee09afff0be9

As for changing the name of the script, I'd love it too, but currently 
the code is too tied to Fedora 16 specifically, so by changing the name 
we'd end up with a misleading name. Given this reasoning, I won't change 
it until we can get it to reasonably work on recent versions of popular 
community distros (say Fedora, Ubuntu and Open SUSE).

Cheers,

Lucas

>   thanks !
>
> Daniel
>
> Signed-off-by: Daniel Veillard<[email protected]>
>
> diff --git a/install-autotest-server b/install-autotest-server
> index 19c1507..35accd8 100644
> --- a/install-autotest-server
> +++ b/install-autotest-server
> @@ -2,7 +2,7 @@
>
>   ATHOME=/usr/local/autotest
>   DATETIMESTAMP=$(date "+%m-%d-%Y-%H-%M-%S")
> -BASENAME=$(echo $0 | cut -f1 -d '.')
> +BASENAME=$(echo `basename $0` | cut -f1 -d '.')
>   LOG="/tmp/$BASENAME-$DATETIMESTAMP.log"
>
>   print_log() {
> @@ -54,11 +54,11 @@ print_log "INFO" "Installing the Autotest server"
>   print_log "INFO" "A log of operation is kept in $LOG"
>   print_log "INFO" "Install started at: $(date)"
>
> -LOCALFREE=$(df -k /usr/local | awk '{ print $4 }' | grep -v Avai)
> -VARFREE=$(df -k /var | awk '{ print $4 }' | grep -v Avai)
> +LOCALFREE=$(df -kP /usr/local | awk '{ print $4 }' | grep -v Avai)
> +VARFREE=$(df -kP /var | awk '{ print $4 }' | grep -v Avai)
>
> -LOCALFREE_HUMAN=$(df -H /usr/local | awk '{ print $4 }' | grep -v Avai)
> -VARFREE_HUMAN=$(df -H /var | awk '{ print $4 }' | grep -v Avai)
> +LOCALFREE_HUMAN=$(df -HP /usr/local | awk '{ print $4 }' | grep -v Avai)
> +VARFREE_HUMAN=$(df -HP /var | awk '{ print $4 }' | grep -v Avai)
>
>   print_log "INFO" "/usr/local free $LOCALFREE_HUMAN"
>   print_log "INFO" "/var free $VARFREE_HUMAN"
>
>

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to