File tree 3 files changed +60
-5
lines changed
var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks
3 files changed +60
-5
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash -eux
2
+ #
3
+ # Copyright 2025 Delphix
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ case $1 in
19
+ upgrade)
20
+ # Home directories were previously mounted under /export/home,
21
+ # and this was changed to /home. This is the upgrade logic that
22
+ # updates the /etc/fstab file to reflect that change.
23
+ # Home directories will be mounted in both /export/home and /home
24
+ # until the system is rebooted to ensure that running processes
25
+ # referencing the old /export/home paths continue to function
26
+ # while also enabling new logins under /home to work.
27
+ fs_tab=/etc/fstab
28
+
29
+ if grep -q " \/export\/home" " $fs_tab " ; then
30
+ sed -i ' s|/export/home|/home|g' " $fs_tab "
31
+ mount /home
32
+ fi
33
+
34
+ passwd_file=/etc/passwd
35
+ if grep -q " \/export\/home" " $passwd_file " ; then
36
+ sed -i ' s/\/export\/home/\/home/g' /etc/passwd
37
+ fi
38
+
39
+ ;;
40
+ esac
41
+
42
+ exit 0
Original file line number Diff line number Diff line change @@ -24,6 +24,19 @@ Before=rsync.service docker.service
24
24
Type =oneshot
25
25
ExecStart =/var/lib/delphix-platform/ansible/apply
26
26
ExecStart =/var/lib/delphix-platform/dynamic-debug
27
+ ExecStart =/bin/bash -c " \
28
+ if ! mountpoint -q /export/home; then \
29
+ if [ ! -L /export/home ]; then \
30
+ echo 'Ensuring /export/home is a symlink to /home...'; \
31
+ if [ ! -d /export ]; then \
32
+ mkdir /export; \
33
+ fi; \
34
+ if [ -d /export ]; then \
35
+ echo 'Creating symlink: /export/home -> /home'; \
36
+ ln -s /home /export/home; \
37
+ fi; \
38
+ fi; \
39
+ fi"
27
40
RemainAfterExit =yes
28
41
29
42
#
Original file line number Diff line number Diff line change 1
1
#
2
- # Copyright 2018, 2023 Delphix
2
+ # Copyright 2018, 2025 Delphix
3
3
#
4
4
# Licensed under the Apache License, Version 2.0 (the "License");
5
5
# you may not use this file except in compliance with the License.
22
22
# it below; otherwise that task will fail.
23
23
#
24
24
- file :
25
- path : /export/ home
25
+ path : /home
26
26
state : directory
27
27
mode : 0755
28
28
35
35
shell : /bin/bash
36
36
create_home : yes
37
37
comment : Delphix User
38
- home : /export/ home/delphix
38
+ home : /home/delphix
39
39
40
40
#
41
41
# In order for this locale to be used (e.g. by virtualization) we need
605
605
# Set to true to disable the servicediscovery plugin.
606
606
disabled=true
607
607
when :
608
- - platform == "esx "
608
+ - platform == "vmware "
609
609
notify : " vmware-tools config changed"
610
610
611
611
#
635
635
636
636
- name : Source bash completion
637
637
blockinfile :
638
- dest : " /export/ home/delphix/.bashrc"
638
+ dest : " /home/delphix/.bashrc"
639
639
block : |
640
640
. /etc/bash_completion.d/systemctl
641
641
. /etc/bash_completion.d/zfs
You can’t perform that action at this time.
0 commit comments