diff --git a/debian/preinst b/debian/preinst new file mode 100644 index 00000000..eaba07c6 --- /dev/null +++ b/debian/preinst @@ -0,0 +1,37 @@ +#!/bin/bash -eux +# +# Copyright 2024 Delphix +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +case $1 in +upgrade) + sed -i 's|/export/home|/home|g' /etc/fstab + mount /home + echo $(mount | grep home) + + if [[ -e /etc/auto.master ]] + then + auto_home_line="$(grep auto_home auto)" + line_len=$(expr length "${auto_home_line}") + if [[ "$line_len" -gt 0 ]] + then + sed -i 's|/home auto_home -nobrowse|#/home auto_home -nobrowse|g' auto + systemctl restart autofs + fi + fi + ;; +esac + +exit 0 diff --git a/files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks/main.yml b/files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks/main.yml index 58d68b19..c6d52fc7 100644 --- a/files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks/main.yml +++ b/files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks/main.yml @@ -22,7 +22,7 @@ # it below; otherwise that task will fail. # - file: - path: /export/home + path: /home state: directory mode: 0755 @@ -35,7 +35,7 @@ shell: /bin/bash create_home: yes comment: Delphix User - home: /export/home/delphix + home: /home/delphix # # In order for this locale to be used (e.g. by virtualization) we need @@ -689,7 +689,7 @@ - name: Source bash completion blockinfile: - dest: "/export/home/delphix/.bashrc" + dest: "/home/delphix/.bashrc" block: | . /etc/bash_completion.d/systemctl . /etc/bash_completion.d/zfs