On 2017-03-19, Wolfgang Schweer wrote:
> On Sat, Mar 18, 2017 at 08:03:44AM -0700, Vagrant Cascadian wrote:
>> The workaround for LTSP would be to add an additional stanza in the
>> nbd-server configuration so that both behave the same.
>> 
>> [opt/ltsp/i386]
>> 
>> [/opt/ltsp/i386]
>
> We have already documented a workaround on the Stretch status page:
> https://wiki.debian.org/DebianEdu/Status/Stretch#Known_installation_related_issues
>  
>> The better solution would be to fix in nbd's initramfs hooks:
>> 
>> case nbdroot in
>>   ^/*|*:/*) nbdpath= ...
>>      nbdsrv= ... ;;
>> esac
>
> While trying to fix it there w/o success, I'm wondering if something 
> like this would be ok (might be smarter, though):
>
> diff --git a/server/ltsp-config b/server/ltsp-config
> index c7fa7c4f..fb6f51a0 100755
> --- a/server/ltsp-config
> +++ b/server/ltsp-config
> @@ -211,9 +211,12 @@ EOF
>                  echo "Removing old configuration file $conf in order to 
> upgrade it"
>                  rm -f "$conf"
>              fi
> +        echo "Adjusting old configuration file $conf to be compatible with 
> NBD"
> +        sed -i "s#/opt/ltsp#opt/ltsp#" /etc/nbd-server/conf.d/ltsp_$name.conf
>          fi
>  
>          if check_overwrite $conf; then
> +            BASE=$(echo $BASE | sed -e "s#/##")
>              cat >"$conf" <<EOF
>  [$BASE/$name]
>  exportname = $image
>
> CCing Tomasz; we discussed this bug yesterday at BSP Mönchengladbach 
> (credativ) and he pointed me to ltsp-config.

You'd need to call ltsp-config with the --overwrite option, and then
using sed to edit doesn't really make sense.

It needs to add stanzas for both [opt/ltsp/...] and [/opt/ltsp/...] to
the nbd-server configuration, otherwise older client images that do not
contain this bug will not work. It's an ugly workaround to do it this
way, which is why I haven't worked around the issue in LTSP yet...


live well,
  vagrant

Attachment: signature.asc
Description: PGP signature

Reply via email to