The *dch-storage-net* role configures a machine to connect the storage network and mount shared folders from the storage appliance. The `wait-global-address.sh` script and corresponding *wait-global-address@.service* systemd unit template are necessary to ensure that the storage network is actually available before attempting to mount the shared volumes. This is particularly important at boot, since `dhcpcd` does not implement any kind of signaling that can be used by *network-online.target*, so the network is considered "online" as soon as the `dhcpcd` process has started. This typically results in "network unreachable" errors.
15 lines
290 B
Desktop File
15 lines
290 B
Desktop File
[Unit]
|
|
Description=Wait for global address on %I
|
|
Requires=sys-subsystem-net-devices-%i.device
|
|
After=network-pre.target
|
|
Before=network-online.target
|
|
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
ExecStart=/usr/local/libexec/wait-global-address.sh %I
|
|
|
|
[Install]
|
|
WantedBy=network-online.target
|