-
Notifications
You must be signed in to change notification settings - Fork 1
/
arch32
executable file
·41 lines (39 loc) · 1.03 KB
/
arch32
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
40
41
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
case $1 in
start)
stat_busy "Starting Arch32 chroot"
mount --bind /proc /opt/arch32/proc
mount --bind /proc/bus/usb /opt/arch32/proc/bus/usb
mount --bind /dev /opt/arch32/dev
mount --bind /dev/pts /opt/arch32/dev/pts
mount --bind /dev/shm /opt/arch32/dev/shm
mount --bind /sys /opt/arch32/sys
mount --bind /tmp /opt/arch32/tmp
mount --bind /home /opt/arch32/home
add_daemon arch32
stat_done
;;
stop)
stat_busy "Stopping Arch32 chroot"
umount /opt/arch32/proc/bus/usb
umount /opt/arch32/proc
umount /opt/arch32/dev/pts
umount /opt/arch32/dev/shm
umount /opt/arch32/dev
umount /opt/arch32/sys
umount /opt/arch32/tmp
umount /opt/arch32/home
rm_daemon arch32
stat_done
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0