[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [debian-edu-commits] debian-edu/ 01/01: share/ltsp/init-ltsp.d/60-edu-diskless-ws: Stop using update-rc.d to disable the automounter if the homedir is mounted via sshfs as this isn't stable. Do it the way ltsp does.



[Wolfgang Schweer]
> share/ltsp/init-ltsp.d/60-edu-diskless-ws: Stop using update-rc.d to
> disable the automounter if the homedir is mounted via sshfs as this
> isn't stable. Do it the way ltsp does.

The two methods are not equivalent, as update-rc.d will reorder the
boot sequence based on dependencies (aka call insserv) with the
possibility of making it more optimized (for startpar).  Removing the
symlinks will not do this.

Perhaps do both?  Also the change do not implement the same operation
as the original:

> diff --git a/share/ltsp/init-ltsp.d/60-edu-diskless-ws b/share/ltsp/init-ltsp.d/60-edu-diskless-ws
> index 90f8de1..a0d5029 100644
> --- a/share/ltsp/init-ltsp.d/60-edu-diskless-ws
> +++ b/share/ltsp/init-ltsp.d/60-edu-diskless-ws
> @@ -1,13 +1,6 @@
>  #!/bin/sh
>  # For Debian Edu diskless workstations (i.e. ltsp fat clients).
> -if boolean_is_true "$LTSP_FATCLIENT"; then
> -    if [ -z "$DEFAULT_DISPLAY_MANAGER" ]; then
> -        # Disable autofs to let sshfs mount home dir (LDM is used).
> -        update-rc.d autofs disable 2 >/dev/null  2>&1
> -    else
> -        # Enable services, just to be sure (kdm, gdm3 or lightdm is used).
> -        for service in autofs nfs-common nslcd nscd ; do
> -            update-rc.d $service enable 2 >/dev/null  2>&1
> -        done
> -    fi
> +if boolean_is_true "$LTSP_FATCLIENT" && [ -z "$DEFAULT_DISPLAY_MANAGER" ]; then
> +    # Remove autofs to let sshfs mount home dir (LDM is used).
> +    rm -f /etc/rc?.d/???"autofs" "/etc/init.d/autofs" "/etc/init/autofs.conf"
>  fi

The old code would disable autofs and use sshfs when
"$DEFAULT_DISPLAY_MANAGER" is empty, and use autofs when it was set.
The new code behave differently.  Are you sure the old behavior is no
longer wanted?  It used to be the way to get autofs and shared nfs
directories mounted on diskless workstations.

-- 
Happy hacking
Petter Reinholdtsen


Reply to: