Skip to content

Commit 8f0067f

Browse files
committed
Changing the delphix-legacy-link.service to perform the same steps next reboot like deferred upgrade.
1 parent b1e8b82 commit 8f0067f

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

files/common/lib/systemd/system/delphix-legacy-link.service

+19-17
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,25 @@ Requires=delphix-platform.service
2121

2222
[Service]
2323
Type=oneshot
24-
ExecStart=/bin/sh -c '\
25-
echo "Ensuring /export/home is a symlink to /home..."; \
26-
if mountpoint -q /export/home; then \
27-
echo "/export/home is a mountpoint, unmounting..."; \
28-
umount /export/home || { echo "Failed to unmount /export/home"; exit 1; }; \
29-
fi; \
30-
if [ -e /export/home ] && [ ! -L /export/home ]; then \
31-
echo "Removing existing /export/home directory..."; \
32-
rm -rf /export/home; \
33-
fi; \
34-
if [ ! -d /export ]; then \
35-
mkdir /export; \
36-
fi; \
37-
if [ -d /export ] && [ ! -L /export/home ]; then \
38-
echo "Creating symlink: /export/home -> /home"; \
39-
ln -s /home /export/home; \
40-
fi;'
24+
ExecStart=/bin/bash -c " \
25+
if [ ! -L /export/home ]; then \
26+
echo 'Ensuring /export/home is a symlink to /home...'; \
27+
if mountpoint -q /export/home; then \
28+
echo '/export/home is a mountpoint, unmounting...'; \
29+
umount /export/home || { echo 'Failed to unmount /export/home'; exit 1; }; \
30+
fi; \
31+
if [ -e /export/home ]; then \
32+
echo 'Removing existing /export/home directory...'; \
33+
rm -rf /export/home; \
34+
fi; \
35+
if [ ! -d /export ]; then \
36+
mkdir /export; \
37+
fi; \
38+
if [ -d /export ]; then \
39+
echo 'Creating symlink: /export/home -> /home'; \
40+
ln -s /home /export/home; \
41+
fi; \
42+
fi"
4143

4244
[Install]
4345
WantedBy=delphix.target

0 commit comments

Comments
 (0)