1 | #!/bin/bash |
---|
2 | set -e |
---|
3 | |
---|
4 | source CONFIG |
---|
5 | source functions |
---|
6 | |
---|
7 | ensure BASE NAME |
---|
8 | |
---|
9 | FIXED_PACKAGES=" ldap-auth-client ntp lmd-client epoptes-client lliurex-shutdowner lliurex-zero-shutdown-client n4d n4d-lliurex-base language-pack-ca lliurex-grub-custom lliurex-artwork-plymouth-desktop " |
---|
10 | |
---|
11 | if exists PACKAGES; then |
---|
12 | PACKAGES+=" ${FIXED_PACKAGES} " |
---|
13 | else |
---|
14 | PACKAGES=" ${FIXED_PACKAGES} " |
---|
15 | fi |
---|
16 | |
---|
17 | OPTS="" |
---|
18 | if [ "x${VERBOSE}" = "x0" ]; then |
---|
19 | echo "Installing ..." |
---|
20 | exec &> /dev/null |
---|
21 | else |
---|
22 | echo "Installing ... ${PACKAGES}" |
---|
23 | fi |
---|
24 | |
---|
25 | cat > ./${BASE}/${NAME}/script.sh << _EOF |
---|
26 | export DEBIAN_FRONTEND=noninteractive |
---|
27 | |
---|
28 | echo ldap-auth-config ldap-auth-config/override boolean true | debconf-set-selections |
---|
29 | echo ldap-auth-config ldap-auth-config/bindpw password | debconf-set-selections |
---|
30 | echo ldap-auth-config ldap-auth-config/rootbindpw password | debconf-set-selections |
---|
31 | echo ldap-auth-config ldap-auth-config/binddn string cn=proxyuser,dc=example,dc=net | debconf-set-selections |
---|
32 | echo ldap-auth-config ldap-auth-config/move-to-debconf boolean true | debconf-set-selections |
---|
33 | echo ldap-auth-config ldap-auth-config/ldapns/ldap-server string ldap://server/ | debconf-set-selections |
---|
34 | echo ldap-auth-config ldap-auth-config/ldapns/base-dn string dc=ma5,dc=lliurex,dc=net | debconf-set-selections |
---|
35 | echo ldap-auth-config ldap-auth-config/dbrootlogin boolean true | debconf-set-selections |
---|
36 | echo ldap-auth-config ldap-auth-config/dblogin boolean false | debconf-set-selections |
---|
37 | echo ldap-auth-config ldap-auth-config/pam_password select md5 | debconf-set-selections |
---|
38 | echo libpam-runtime libpam-runtime/profiles multiselect unix, ldap, systemd | debconf-set-selections |
---|
39 | echo ldap-auth-config ldap-auth-config/ldapns/ldap_version select 3 | debconf-set-selections |
---|
40 | echo ldap-auth-config ldap-auth-config/rootbinddn string cn=admin,dc=ma5,dc=lliurex,dc=net | debconf-set-selections |
---|
41 | echo ldap-auth-config ldap-auth-config/override boolean true | debconf-set-selections |
---|
42 | |
---|
43 | |
---|
44 | apt-get -y update |
---|
45 | apt-get -y install ${PACKAGES} |
---|
46 | _EOF |
---|
47 | |
---|
48 | |
---|
49 | ltsp-chroot --arch ${ARCH} --base ${BASE} -pcma ${NAME} bash /script.sh |
---|
50 | |
---|
51 | if [ "$?" != "0" ]; then |
---|
52 | exit 1 |
---|
53 | fi |
---|
54 | |
---|
55 | rm -f ./${BASE}/${NAME}/script.sh |
---|
56 | |
---|
57 | exit 0 |
---|