File tree Expand file tree Collapse file tree 1 file changed +18
-6
lines changed
files/common/var/lib/delphix-platform Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -30,22 +30,34 @@ if mountpoint -q /export/home; then
30
30
fi
31
31
32
32
# /export/home is not mounted, check if /home is mounted
33
+ # Check if /home is mounted
33
34
if mountpoint -q /home; then
34
- echo ' /home is mounted. Proceeding with the unmount check for /export/home.'
35
+ echo " /home is mounted. Proceeding with /export/home cleanup."
36
+ # If /export/home exists
37
+ if [ -d /export/home ]; then
38
+ echo " /export/home exists. Attempting to remove it..."
39
+ rmdir /export/home 2> /dev/null
40
+ if [ $? -eq 0 ]; then
41
+ echo " /export/home directory removed successfully."
42
+ else
43
+ echo " /export/home is not empty. Please clean it manually before running this script."
44
+ exit 1
45
+ fi
46
+ fi
35
47
else
36
- echo ' /home is not mounted. Aborting to avoid risk of data loss.'
48
+ echo " /home is not mounted. Aborting to avoid risk of data loss."
37
49
exit 1
38
50
fi
39
51
40
- # Ensure /export directory exists
52
+ # Ensure /export exists
41
53
mkdir -p /export
42
54
43
55
# Create symlink
44
- echo ' Creating symlink: /export/home -> /home'
56
+ echo " Creating symlink: /export/home -> /home"
45
57
ln -s /home /export/home
46
58
if [ $? -eq 0 ]; then
47
- echo ' Symlink created successfully.'
59
+ echo " Symlink created successfully."
48
60
else
49
- echo ' Failed to create symlink. Please check permissions and try again.'
61
+ echo " Failed to create symlink. Please check permissions and try again."
50
62
exit 1
51
63
fi
You can’t perform that action at this time.
0 commit comments