forked from BunsenLabs/bunsen-netinstall
-
Notifications
You must be signed in to change notification settings - Fork 0
/
postinstall_commands
50 lines (43 loc) · 1.94 KB
/
postinstall_commands
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
# commands to run after installing all files and packages
# add any needed extra groups
for i in #cbnetwork
do
if grep -q "^${i}:" /etc/group
then
msg "group $i already exists"
else
msg "adding group $i"
sudo addgroup $i || errmsg "failed to add group: $i"
fi
done
# add user to some extra groups
# NB You should also check sysfiles2/etc/adduser.conf for default groups to add new users to
for i in audio video cdrom plugdev floppy lp dip
do
sudo addgroup "$i"
sudo adduser $user $i || errmsg "failed to add user: $user to group: $i"
done
for i in netdev systemd-journal lpadmin scanner bluetooth
do
sudo addgroup --system "$i"
sudo adduser $user $i || errmsg "failed to add user: $user to group: $i"
done
# make sure gksu runs in sudo mode
#sudo update-alternatives --set libgksu-gconf-defaults /usr/share/libgksu/debian/gconf-defaults.libgksu-sudo || errmsg "failed to edit alternative for libgksu-gconf-defaults"
#sudo update-gconf-defaults || errmsg "failed to update gconf defaults"
# set cursor theme to pre-empt Adwaita
#sudo update-alternatives --set x-cursor-theme /usr/share/icons/DMZ-White/cursor.theme || errmsg "failed to edit alternative for x-cursor-theme"
# dmz-cursor-theme may have been installed after bunsen-configs
# so re-run the cursor theme setting in bunsen-configs' postinst script.
DEFAULT_CURSOR_THEME='/usr/share/icons/DMZ-White/cursor.theme'
if update-alternatives --list x-cursor-theme 2>/dev/null | grep -q "$DEFAULT_CURSOR_THEME"
then
sudo update-alternatives --set x-cursor-theme "$DEFAULT_CURSOR_THEME"
else
errmsg "failed to edit alternative for x-cursor-theme"
fi
# Now bunsen-os-release is installed, refresh boot menu.
sudo update-grub || errmsg "Failed to update grub"
# Add install date to /etc/bunsen/bunsen_install
#sudo echo "Install date: $(date --utc +%FT%T)" >> /etc/bunsen/bunsen_install
sudo tee -a <<< "Install date: $(date --utc +%FT%T)" /etc/bunsen/bunsen_install