-
Notifications
You must be signed in to change notification settings - Fork 0
/
Student_Login_Script.sh
executable file
·74 lines (57 loc) · 1.49 KB
/
Student_Login_Script.sh
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#Brian D. West, Student Login Script School District of Janesville, 2010
#Modified by Sean M. Harper 2012
#!/bin/sh
PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH
#Global Varibles
user=`whoami`
#Functions
school()
{
mkdir /Volumes/$user
mkdir /Volumes/internet
mkdir /Volumes/Shared
`mount -o nobrowse -t smbfs //$user@$esc-psdc1/macfix$ /Volumes/internet`
`mount -t smbfs //$user@$1-staff1/StudentFiles/$user /Volumes/$user`
`mount -t smbfs //$user@$1-staff1/StudentFiles/_Shared /Volumes/Shared`
}
high_school()
{
mkdir /Volumes/$user
mkdir /Volumes/internet
mkdir /Volumes/Shared
`mount -o nobrowse -t smbfs //$user@$1-admin1/macfix$ /Volumes/internet`
`mount -t smbfs //$user@$1-staff2/StudentFiles/$user /Volumes/$user`
`mount -t smbfs //$user@$1-staff2/StudentFiles/_Shared /Volumes/Shared`
}
ESC()
{
mkdir /Volumes/internet
`mount -o nobrowse -t smbfs //$user@esc-psdc1/macfix$ /Volumes/internet`
}
#Main Program
#pulls the second octet for location
network=`ifconfig | grep "inet " | grep -v 127.0.0.1 |cut -c 10-11`
case "$network" in
1.) ESC ;;
10) high_school "cra" ;;
11) high_school "par" ;;
20) school "edi" ;;
21) school "fra" ;;
22) school "mar" ;;
30) school "ada" ;;
31) school "har" ;;
32) school "jac" ;;
33) school "jef" ;;
34) school "ken" ;;
35) school "lin" ;;
36) school "mad" ;;
37) school "mon" ;;
38) school "roo" ;;
39) school "van" ;;
40) school "was" ;;
41) school "wil" ;;
50) school "roc" ;;
51) school "tag" ;;
*) echo Not at a district site, call 608-743-5004.
esac
exit 0