bd0be26d9b3ddc2961f1d206b08dba5fc41e2fd1
[live-initramfs-grml.git] / scripts / live-bottom / 22gnome_panel_data
1 #!/bin/sh
2
3 #set -e
4
5 # initramfs-tools header
6
7 PREREQ=""
8
9 prereqs()
10 {
11         echo "${PREREQ}"
12 }
13
14 case "${1}" in
15         prereqs)
16                 prereqs
17                 exit 0
18                 ;;
19 esac
20
21 # live-initramfs header
22
23 if [ -n "${NOGNOMEPANEL}" ]
24 then
25         exit 0
26 fi
27
28 . /scripts/live-functions
29
30 log_begin_msg "Configuring gnome-panel-data"
31
32 # live-initramfs script
33
34 if [ -x /root/usr/sbin/laptop-detect ]
35 then
36         if chroot /root laptop-detect
37         then
38                 live-reconfigure /root gnome-panel-data
39         fi
40 fi
41
42 panel_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gnome-panel-data 2>/dev/null) || panel_version=""
43
44 if [ -n "${panel_version}" ] && [ -n "${USERNAME}" ]
45 then
46         chroot /root sudo -u "${USERNAME}" gconftool-2 -s -t bool /apps/panel/global/disable_lock_screen true
47 fi
48
49 log_end_msg