/[fai]/trunk/examples/simple/scripts/DEFAULT/S20
ViewVC logotype

Contents of /trunk/examples/simple/scripts/DEFAULT/S20

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2754 - (show annotations) (download)
Wed Apr 6 17:40:32 2005 UTC (8 years, 1 month ago) by lange
File size: 3132 byte(s)
remove needless code that was moved to FAIBASE or is stupid
1 #! /usr/bin/cfengine
2
3 control:
4 OutputPrefix = ("cfengine")
5 actionsequence = ( files directories editfiles )
6 EditFileSize = ( 30000 )
7
8 files:
9 any::
10
11 # floppy and cdroms are accessible for all
12 ${target}/dev include=fd* mode=666 action=fixall r=1
13 ${target}/dev include=sr* mode=444 action=fixall r=1
14
15 directories:
16
17 BSDAMD::
18 ${target}/scratch/. mode=755 owner=0 group=0
19
20 FILES_SCRATCH::
21 ${target}/files/scratch/. mode=1777 owner=0 group=0
22
23 SCRATCH::
24 ${target}/scratch mode=1777 owner=0 group=0
25
26 editfiles:
27 any::
28
29 { ${target}/etc/init.d/sysklogd
30 ReplaceAll "^SYSLOGD=.*" With "SYSLOGD=${dblquote}-m 360${dblquote}"
31 }
32
33 # add second root account using tcsh
34 # insert encrypted root password
35 { ${target}/etc/passwd
36 LocateLineMatching "^root:.*"
37 InsertLine "roott::0:0:root:/root:/usr/bin/tcsh"
38 ReplaceAll "^root::" With "root:${rootpw}:"
39 ReplaceAll "^roott::" With "roott:${rootpw}:"
40 }
41
42 { ${target}/etc/syslog.conf
43 ReplaceAll "daemon.*/var/log/daemon.log"
44 With "daemon.warn${tab}${tab}${tab}-/var/log/daemon.log"
45 ReplaceAll "kern.*/var/log/kern.log"
46 With "kern.warn${tab}${tab}${tab}-/var/log/kern.log"
47 AppendIfNoSuchLine "local6.debug${tab}${tab}${tab}/var/log/daemon.log"
48 }
49
50 DEMO::
51 { ${target}/etc/passwd
52 ReplaceAll "^demo:!:" With "demo:${rootpw}:"
53 }
54
55 HOME_CLIENT::
56 { ${target}/etc/fstab
57 HashCommentLinesContaining "/home "
58 AppendIfNoSuchLine "${hserver}:/home /home nfs rw,nosuid 0 0"
59 }
60
61 DATALESS::
62 { ${target}/etc/fstab
63 HashCommentLinesContaining "/usr "
64 AppendIfNoSuchLine "${bserver}:/usr /usr nfs ro,noatime,actimeo=900 0 0"
65 }
66
67 USR_LOCAL_MOUNT::
68 { ${target}/etc/fstab
69 HashCommentLinesContaining "/usr/local "
70 AppendIfNoSuchLine "${bserver}:/usr/local /usr/local nfs ro,noatime,actimeo=900 0 0"
71 }
72
73 SCRATCH::
74 { ${target}/etc/exports
75 AutoCreate
76 AppendIfNoSuchLine "/scratch${tab}${tab} @faiclients(async,rw,no_root_squash)"
77 }
78
79 FILES_SCRATCH.!NET_9::
80 { ${target}/etc/exports
81 AutoCreate
82 AppendIfNoSuchLine "/files/scratch${tab}${tab} @faiclients(async,rw,no_root_squash)"
83 }
84
85 HOME_SERVER::
86 { ${target}/etc/exports
87 AppendIfNoSuchLine "/usr${tab}${tab}@faiclients(async,ro,no_root_squash)"
88 AppendIfNoSuchLine "/home${tab}${tab}@sundomain(async,rw,no_root_squash) @faiclients(async,rw,no_root_squash)"
89 }
90
91 atom00::
92 { ${target}/etc/default/nis
93 ReplaceAll "NISSERVER=false" With "NISSERVER=true"
94 }
95
96 SERVER::
97 { ${target}/etc/ssh/sshd_config
98 ReplaceAll "X11Forwarding no" With "X11Forwarding yes"
99 }
100
101 { ${target}/etc/shells
102 AppendIfNoSuchLine "/usr/local/bin/tcsh"
103 }
104
105 NOGETTY::
106 { ${target}/etc/inittab
107 HashCommentLinesContaining "respawn:/sbin/getty "
108 }
109
110 # add scratch.map
111 BSDAMD::
112 { ${target}/etc/am-utils/amd.conf
113 AppendIfNoSuchLine "[ /scratch ]"
114 AppendIfNoSuchLine "map_name = amd.scratch"
115 }
116
117 { ${target}/etc/default/am-utils
118 ReplaceAll "AM_UTILS_MAP_NET='true'"
119 With "AM_UTILS_MAP_NET='false'"
120 }
121
122 BEOWULF::
123 { ${target}/etc/ld.so.conf
124 AppendIfNoSuchLine "/usr/local/lib"
125 }

Properties

Name Value
svn:eol-style native
svn:executable *
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.5