summaryrefslogtreecommitdiff
path: root/roles/ws/base/templates/hide-ntfs-disks.sh.j2
blob: 898e7f3bf4c28147302afa466f011a74b843a3fe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

MOUNT_BASE_D="/media/.ntfs"
rm -rf "$MOUNT_BASE_D"
mkdir -p "$MOUNT_BASE_D"
chmod 0700 "$MOUNT_BASE_D"

{% for disk in ws_base_hide_ntfs_disks %}

name="$(readlink -f '{{ disk }}' | xargs basename)"
mkdir -p "$MOUNT_BASE_D/$name"
/bin/mount -o no_def_opts,user_id=0,group_id=0,ro "{{ disk }}" "$MOUNT_BASE_D/$name"
{% endfor %}