diff options
author | Ben Howard <ben.howard@ubuntu.com> | 2015-03-25 11:04:05 -0600 |
---|---|---|
committer | usd-importer <ubuntu-server@lists.ubuntu.com> | 2015-04-10 23:48:27 +0000 |
commit | 84a3d292f81a5fa2c827eca3b31501f2c3d973e5 (patch) | |
tree | 165d3033645468cfa6b852e88f8377c2d3408967 /debian/ephemeral-disk-warning.sh | |
parent | 2761a00bd67c512b1e47619f6f945ba2e4c7f83c (diff) | |
parent | 5b26ef33dbffbb2cebbfb996f8799d131dc842ae (diff) | |
download | vyos-walinuxagent-84a3d292f81a5fa2c827eca3b31501f2c3d973e5.tar.gz vyos-walinuxagent-84a3d292f81a5fa2c827eca3b31501f2c3d973e5.zip |
Import patches-applied version 2.0.12-0ubuntu1 to applied/ubuntu/vivid-proposed
Imported using git-ubuntu import.
Changelog parent: 2761a00bd67c512b1e47619f6f945ba2e4c7f83c
Unapplied parent: 5b26ef33dbffbb2cebbfb996f8799d131dc842ae
New changelog entries:
* New upstream release.
* Added debian/watch for easier maintenance.
* Fix regression of missing dataloss warning by adding systemd unit file.
Diffstat (limited to 'debian/ephemeral-disk-warning.sh')
-rwxr-xr-x | debian/ephemeral-disk-warning.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/debian/ephemeral-disk-warning.sh b/debian/ephemeral-disk-warning.sh new file mode 100755 index 0000000..82b043b --- /dev/null +++ b/debian/ephemeral-disk-warning.sh @@ -0,0 +1,23 @@ +#!/bin/sh +dev_resource=$(readlink -f /dev/disk/azure/resource-part1) +dev_resource_mp=$(mount | awk '$1==R {print$3}' "R=${dev_resource}") +warn_file="${dev_resource_mp}/DATALOSS_WARNING_README.txt" + +if [ ! -f "${warn_file}" ]; then + cat > ${warn_file} <<EOM +WARNING: THIS IS A TEMPORARY DISK. + +Any data stored on this drive is SUBJECT TO LOSS and THERE IS NO WAY TO +RECOVER IT. + +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 +EOM + + chmod 0444 ${warn_file} + chattr +i ${warn_file} + logger "Added ephemeral disk warning to ${warn_file}" +fi + |