HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux Droplet-NYC1-3 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: www-data (33)
PHP: 7.4.3-4ubuntu2.29
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //etc/udev/rules.d/99-digitalocean-automount.rules
# Only try to automount DO block volumes.
SUBSYSTEM!="block", GOTO="do_automount_end"
ENV{ID_VENDOR}!="DO", GOTO="do_automount_end"
ENV{ID_MODEL}!="Volume", GOTO="do_automount_end"
# Only automount on the "change" action.
ACTION!="change", GOTO="do_automount_end"
# Only try to automount filesystems we know about.
ENV{ID_FS_TYPE}!="ext4|xfs", GOTO="do_automount_end"

# Create a temporary mountpoint and temporary location for the first-mount script.
IMPORT{program}="/bin/sh -c 'echo TMP_MOUNT_DIR=$(mktemp -d -p /mnt .do-first-mount-XXXXXXXXX)'"
# Handle temporary mountpoint creation failure.
ENV{TMP_MOUNT_DIR}=="", GOTO="do_automount_end"
IMPORT{program}="/bin/sh -c 'echo TMP_SCRIPT=$(mktemp -t .do-first-mount-XXXXXXXXX.sh)'"
# Handle temporary script location creation failure.
ENV{TMP_SCRIPT}=="", PROGRAM="/bin/sh -c '/bin/rmdir %E{TMP_MOUNT_DIR} || exit 0'", GOTO="do_automount_end"

RUN{program}+="/var/lib/cloud/scripts/per-instance/systemd_automount.sh %k %E{TMP_MOUNT_DIR} %E{TMP_SCRIPT} '%E{ID_SERIAL}' '%E{ID_FS_TYPE}' '%E{ID_SERIAL_SHORT}' '%E{ID_FS_UUID}' '%E{ID_FS_LABEL}'"

LABEL="do_automount_end"