blob: 7e2fa8712e791f8597c65b14eecda0f98a4dbd83 (
plain)
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
31
32
33
34
35
36
37
38
39
|
#!/bin/sh
start()
{
printf 'Mounting device file systems... '
[ -d /dev/pts ] || mkdir -m 0755 /dev/pts
if ! mount | grep -F ' /dev/pts ' 2>&1 | :; then
mount -t devpts -o noexec,nosuid,gid=5,mode=0620 devpts /dev/pts
fi
ln -sf /run/shm /dev/shm
printf 'done.\n'
}
stop()
{
printf 'Unmounting device file systems... '
if mount | grep -F ' /dev/pts ' 2>&1 | :; then
umount /dev/pts
fi
printf 'done.\n'
}
case "${1}" in
start)
start
;;
stop)
stop
;;
*)
printf 'Usage: %s {start|stop}\n' "${0}" >&2
exit 1
;;
esac
|