source: trunk/minix/commands/scripts/M.sh@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 480 bytes
RevLine 
[9]1#!/bin/sh
2#
3# M, U - mount or unmount standard devices.
4
5case $#:$2 in
61:|2:-r) ;;
7*) echo "Usage: $0 <abbreviation> [-r]" >&2; exit 1
8esac
9
10. /etc/fstab
11
12dev=$1 dir=$1
13
14case $1 in
150) dev=/dev/fd0 dir=fd0 ;;
161) dev=/dev/fd1 dir=fd1 ;;
17PS0|at0|fd0|pat0|pc0|ps0) dev=/dev/$dev dir=fd0 ;;
18PS1|at1|fd1|pat1|pc1|ps1) dev=/dev/$dev dir=fd1 ;;
19root) dev=$root ;;
20tmp) dev=$tmp ;;
21usr) dev=$usr ;;
22*) dev=/dev/$dev dir=mnt
23esac
24
25case $0 in
26*M) mount $dev /$dir $2 ;;
27*U) umount $dev
28esac
Note: See TracBrowser for help on using the repository browser.