File: mount

package info (click to toggle)
debootstick 2.8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 296 kB
  • sloc: sh: 1,364; makefile: 34
file content (25 lines) | stat: -rw-r--r-- 784 bytes parent folder | download | duplicates (3)
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
# vim: filetype=sh

busybox_mount()
{
    $busybox_path mount $*
}

# note: when running 'umount <dir>', umount tries to
# find which mount this is about, reading /etc/mtab
# if available, or /proc/mounts.
# Also, some versions of busybox require /proc/self/exe
# to be available otherwise its internal applets,
# including 'mount', will not be found (unless you
# specify "busybox mount" instead of just "mount").
# As a result, /proc should be mounted first (and
# unmounted last, but this is a side effect of
# the failsafe mode handling anyway).
# The caller should mount /proc as needed, and then
# call the function below.
failsafe_mount_sys_and_dev()
{
    failsafe mount -t devtmpfs none /dev
    failsafe mount -t devpts none /dev/pts
    failsafe mount -t sysfs none /sys
}