summaryrefslogtreecommitdiff
path: root/examples/example/etc/rc.d/ezjail.flavour.example
diff options
context:
space:
mode:
Diffstat (limited to 'examples/example/etc/rc.d/ezjail.flavour.example')
-rwxr-xr-xexamples/example/etc/rc.d/ezjail.flavour.example80
1 files changed, 80 insertions, 0 deletions
diff --git a/examples/example/etc/rc.d/ezjail.flavour.example b/examples/example/etc/rc.d/ezjail.flavour.example
new file mode 100755
index 0000000..4da6ffa
--- /dev/null
+++ b/examples/example/etc/rc.d/ezjail.flavour.example
@@ -0,0 +1,80 @@
1#!/bin/sh
2#
3# BEFORE: DAEMON
4# PROVIDE: ezjail.example.config
5#
6# ezjail flavour example
7
8#
9case "$1" in
10 *start)
11
12# Remove traces of ourself
13##########################
14 rm -f "/etc/rc.d/ezjail.flavour.example"
15
16# Run the main setup routines
17#############################
18 flavour_setup()
19
20 ;;
21 *)
22 ;;
23esac
24
25flavour_setup() {
26
27# Groups
28#########
29#
30# You will probably start with some groups your users should be in
31
32# pw groupadd -q -n coders # -g 1004
33# pw groupadd -q -n sales # -g 1005
34
35# Users
36########
37#
38# You might want to add some users. The password is to be provided in the
39# encrypted form as found in /etc/master.passwd.
40# The example password here is "admin"
41# Refer to crypt(3) and pw(8) for more information
42
43# echo -n '$1$p75bbfK.$Kz3dwkoVlgZrfLZdAXQt91' |\
44# pw useradd -n admin -u 1001 -s /bin/sh -m -d /home/admin -G wheel -c 'Admin User' -H 0
45# echo -n '$1$p75bbfK.$Kz3dwkoVlgZrfLZdAXQt91' |\
46# pw useradd -n saag -u 1002 -s /bin/sh -m -d /home/saag -G coders -c 'Mutton Saag' -H 0
47# echo -n '$1$p75bbfK.$Kz3dwkoVlgZrfLZdAXQt91' |\
48# pw useradd -n mac -u 1002 -s /bin/sh -m -d /home/mac -G sales -c 'Big Mac' -H 0
49
50# Files
51########
52#
53# You can now give files to users just created
54
55# chown -R admin:coders /usr/local/cvsroot
56# chown -R admin:sales /usr/local/nfs/sales
57
58# Packages
59###########
60#
61# Install all packages previously put to /pkg
62# Remove package files afterwards
63
64[ -d /pkg ] && PACKAGESITE=file:// pkg_add -r /pkg/*
65rm -rf /pkg
66
67# Postinstall
68##############
69#
70# Your own stuff here, for example set login shells that were only
71# installed just before.
72
73# Please note, that for all network related stuff like ports,
74# package remote fetching, etc. you need a sane /etc/resolv.conf
75
76# chpass -s /usr/local/bin/bash admin
77# pkg_add -r pico
78# cd /usr/ports/sysutils/screen && make install
79
80}