log_begin_msg "$DESCRIPTION"
-if chroot /root /bin/sh -c laptop-detect; then
- casper-reconfigure /root gnome-panel-data
+if [ -x /root/usr/sbin/laptop-detect ]; then
+ if chroot /root laptop-detect; then
+ casper-reconfigure /root gnome-panel-data
+ fi
fi
panel_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gnome-panel-data 2>/dev/null) || panel_version=""
if [ -n "$panel_version" ]; then
- chroot /root su $USERNAME -- gconftool-2 -s -t bool /apps/panel/global/disable_lock_screen true
+ chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/panel/global/disable_lock_screen true
fi
log_end_msg