summaryrefslogtreecommitdiff
path: root/debian/ephemeral-disk-warning.sh
diff options
context:
space:
mode:
authorBen Howard <ben.howard@ubuntu.com>2016-02-26 11:06:35 -0700
committerusd-importer <ubuntu-server@lists.ubuntu.com>2016-03-02 16:03:59 +0000
commit995626abfb54441366cee4f701744f83c87630b4 (patch)
treee4ba229dbfe6cec53cc5a928ab7a20d6eff4cffa /debian/ephemeral-disk-warning.sh
parentae550a693d18d4ad45fc19cf84b635e433a1a692 (diff)
parent4021cdee90c6d820752738704b3681039eec1bc3 (diff)
downloadvyos-walinuxagent-995626abfb54441366cee4f701744f83c87630b4.tar.gz
vyos-walinuxagent-995626abfb54441366cee4f701744f83c87630b4.zip
Import patches-applied version 2.1.3-0ubuntu3 to applied/ubuntu/xenial-proposed
Imported using git-ubuntu import. Changelog parent: ae550a693d18d4ad45fc19cf84b635e433a1a692 Unapplied parent: 4021cdee90c6d820752738704b3681039eec1bc3 New changelog entries: * Remove conflict with NetworkManager (LP: #1550461): - devices on the hyperv bus are ignored via new udev rule. * Made the upstart job more consistant with systemd service to use the /dev/disk/azure/resource-part1 path instead of /dev/sdb (LP: #1544764)
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}