HEX
Server: Apache/2.4.6 () PHP/7.4.33
System: Linux chile-dev-app-1 5.4.17-2136.315.5.el7uek.x86_64 #2 SMP Wed Dec 21 19:57:57 PST 2022 x86_64
User: apache (48)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: //proc/thread-self/root/usr/libexec/nfs_client_id
#!/bin/bash

RETRY=3

for i in $(seq 1 "$RETRY"); do
    INSTANCE_OCID=$(curl -H "Authorization: Bearer Oracle" -L http://169.254.169.254/opc/v2/instance/id)
    if [[ "$INSTANCE_OCID" == *ocid* ]]; then
        NFS_CLIENT_ID=$(echo -n $INSTANCE_OCID | /bin/sha512sum | head -c 16)
        [[ -f /etc/modprobe.d/nfsclient.conf ]] && sed -i '/nfs4_unique_id/d' /etc/modprobe.d/nfsclient.conf

        echo "options nfs nfs4_unique_id=$NFS_CLIENT_ID" >> /etc/modprobe.d/nfsclient.conf

        break

    else
        sleep 1
    fi

done