14 lines
287 B
Bash
Executable File
14 lines
287 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# 2018 Luke Shumaker
|
|
{
|
|
set -euE
|
|
source "${BASH_SOURCE[0]%/*}/lib/osi.sh"
|
|
needs_root
|
|
|
|
arg_device=$1
|
|
arg_mountpoint=$2
|
|
arg_cmd=("${@:3}")
|
|
|
|
unshare --mount sh -c "mount --make-rslave / && mount -- ${arg_device@Q} ${arg_mountpoint@Q} && exec -- ${arg_cmd[*]@Q}"
|
|
}
|