summaryrefslogtreecommitdiff
path: root/debian/ephemeral-disk-warning.sh
diff options
context:
space:
mode:
Diffstat (limited to 'debian/ephemeral-disk-warning.sh')
-rwxr-xr-xdebian/ephemeral-disk-warning.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/debian/ephemeral-disk-warning.sh b/debian/ephemeral-disk-warning.sh
index 82b043b..3cc8f86 100755
--- a/debian/ephemeral-disk-warning.sh
+++ b/debian/ephemeral-disk-warning.sh
@@ -1,6 +1,6 @@
#!/bin/sh
dev_resource=$(readlink -f /dev/disk/azure/resource-part1)
-dev_resource_mp=$(mount | awk '$1==R {print$3}' "R=${dev_resource}")
+dev_resource_mp=$(awk '$1==R {print$2}' "R=${dev_resource}" /proc/mounts)
warn_file="${dev_resource_mp}/DATALOSS_WARNING_README.txt"
if [ ! -f "${warn_file}" ]; then
@@ -14,6 +14,10 @@ Please do not use this disk for storing any personal or application data.
For additional details to please refer to the MSDN documentation at:
http://msdn.microsoft.com/en-us/library/windowsazure/jj672979.aspx
+
+To remove this warning run:
+ sudo chattr -i $warn_file
+
EOM
chmod 0444 ${warn_file}