/
postinst
35 lines (29 loc) · 960 Bytes
/
postinst
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
#!/bin/bash
LOG=/var/tmp/zentyal-installer.log
# replace motd
cp /usr/share/zenbuntu-core/motd.tail /etc/motd.tail
# Import archive key to avoid warnings
apt-key add /usr/share/zenbuntu-core/zentyal-archive.asc >> $LOG 2>&1
ln -sf /lib/plymouth/themes/zentyal-text/zentyal-text.plymouth /etc/alternatives/text.plymouth
if [ "$1" == "configure" ]
then
cp /usr/share/zenbuntu-core/first-boot.sh /etc/rc.local
if [ -f /etc/default/grub ]
then
update="no"
if ! grep -q ifnames /etc/default/grub
then
sed -i 's/\(GRUB_CMDLINE_LINUX_DEFAULT=".*\)"/\1 net.ifnames=0 biosdevname=0"/' /etc/default/grub
update="yes"
fi
if ! grep -q splash /etc/default/grub
then
sed -i 's/\(GRUB_CMDLINE_LINUX_DEFAULT=".*\)"/\1 splash"/' /etc/default/grub
update="yes"
fi
if [ "$update" == "yes" ]
then
update-grub
fi
fi
fi