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
3030fi
3131
3232# /export/home is not mounted, check if /home is mounted
33+ # Check if /home is mounted
3334if 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
3547else
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."
3749 exit 1
3850fi
3951
40- # Ensure /export directory exists
52+ # Ensure /export exists
4153mkdir -p /export
4254
4355# Create symlink
44- echo ' Creating symlink: /export/home -> /home'
56+ echo " Creating symlink: /export/home -> /home"
4557ln -s /home /export/home
4658if [ $? -eq 0 ]; then
47- echo ' Symlink created successfully.'
59+ echo " Symlink created successfully."
4860else
49- echo ' Failed to create symlink. Please check permissions and try again.'
61+ echo " Failed to create symlink. Please check permissions and try again."
5062 exit 1
5163fi
You can’t perform that action at this time.
0 commit comments