On 2018-07-24, Wolfgang Schweer wrote:
> On Tue, Jul 24, 2018 at 04:46:42PM +0800, Vagrant Cascadian wrote:
>> I would, of course, be interested in bug fixes for NFS support, but I
>> don't forsee making it the default again.
>  
> While the attached patch works for me, I'm not sure if NFS support 
> should be implemented this way; please check.

It looks pretty good.

I'd prefer to call the argument --use-nfs or --nfs-root instead, though.

You should be able to create "$ROOT/etc/ltsp/update-kernels.conf.d/nfs"
instead of editing update-kernels.conf in-place.

I think I'll update it with the above and commit it.

Thanks!

live well,
  vagrant


> From 82c0bc3703e4d67da4d4951cce61b316ccf8be80 Mon Sep 17 00:00:00 2001
> From: Wolfgang Schweer <wschw...@arcor.de>
> Date: Tue, 24 Jul 2018 18:17:02 +0200
> Subject: [PATCH] Add option '--default-nfs' to ltsp-build-client.
>
> If called with this param, LTSP-NFS is used as default (instead of LTSP-NBD).
> Also, setting DEFAULT_NFS to 'True' in custom scripts will do the same.
> ---
>  .../ltsp-build-client/Debian/095-squashfs-image  | 16 +++++++++++++---
>  1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git 
> a/server/share/ltsp/plugins/ltsp-build-client/Debian/095-squashfs-image 
> b/server/share/ltsp/plugins/ltsp-build-client/Debian/095-squashfs-image
> index 7c5223c9..4448b1c0 100644
> --- a/server/share/ltsp/plugins/ltsp-build-client/Debian/095-squashfs-image
> +++ b/server/share/ltsp/plugins/ltsp-build-client/Debian/095-squashfs-image
> @@ -1,7 +1,8 @@
>  case "$MODE" in
>      commandline)
>          add_option "squashfs-image" "`eval_gettext "create squashfs image 
> for use with NBD"`" "advanced" "false"
> -        add_option "no-squashfs-image" "`eval_gettext "skip squashfs image 
> creation"`" "advanced" "false"    
> +        add_option "no-squashfs-image" "`eval_gettext "skip squashfs image 
> creation"`" "advanced" "false"
> +        add_option "default-nfs" "`eval_gettext "use NFS instead of NBD as 
> default"`" "advanced" "false"
>          ;;
>      configure)
>          if [ -n "$option_squashfs_image_value" ]; then
> @@ -12,9 +13,18 @@ case "$MODE" in
>              # set an environment variable we can pick up later
>              SQUASHFS_IMAGE="False"
>          fi
> +        if [ -n "$option_default_nfs_value" ]; then
> +            # set an environment variable we can pick up later
> +            DEFAULT_NFS="True"
> +        fi
>          if [ -z "$SQUASHFS_IMAGE" ]; then
> -         SQUASHFS_IMAGE="True"
> -        fi       
> +            SQUASHFS_IMAGE="True"
> +        fi
> +        ;;
> +    after-install)
> +        if [ "True" = "$DEFAULT_NFS" ]; then
> +            sed -i 's#NBD AOE NFS#NFS NBD AOE#' 
> $ROOT/etc/ltsp/update-kernels.conf
> +        fi
>          ;;
>      finalization)
>          if [ "True" = "$SQUASHFS_IMAGE" ]; then
> -- 
> 2.18.0

Attachment: signature.asc
Description: PGP signature

Reply via email to