blob: 1a8fa78e4421422da35739446c7cb1c7f5cd4fa9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/bin/bash
TS_TOPDIR="${0%/*}/../.."
TS_DESC="none"
. $TS_TOPDIR/functions.sh
ts_init "$*"
ts_skip_nonroot
set -o pipefail
ts_fstab_add "none" "$TS_MOUNTPOINT" "tmpfs" "rw,nosuid,nodev,relatime"
mkdir -p $TS_MOUNTPOINT
$TS_CMD_MOUNT $TS_MOUNTPOINT 2>&1 >> $TS_OUTPUT
$TS_CMD_FINDMNT --target "$TS_MOUNTPOINT" &> /dev/null
[ $? -eq 0 ] || ts_die "Not found target (mount failed?)"
$TS_CMD_FINDMNT --source "none" --target "$TS_MOUNTPOINT" &> /dev/null
[ $? -eq 0 ] || ts_die "Not found source and target"
$TS_CMD_UMOUNT $TS_MOUNTPOINT || ts_die "Cannot umount $TS_MOUNTPOINT"
ts_fstab_clean
ts_log "Success"
ts_finalize
|