--- /dev/null
+#!/bin/sh
+[ "$1" ] && bool="$1" || bool="true"
+# user switching (invite session, switch to gdm, user list)
+gconftool --type boolean --set /desktop/gnome/lockdown/disable_user_switching "$bool"
+# lock screen
+gconftool --type boolean --set /desktop/gnome/lockdown/disable_lock_screen "$bool"
+# restart
+gconftool --type boolean --set /apps/indicator-session/suppress_restart_menuitem "$bool"
+# shutdown
+gconftool --type boolean --set /apps/indicator-session/suppress_shutdown_menuitem "$bool"
+# gdm user list
+gconftool --type boolean --set /apps/gdm/simple-greeter/disable_user_list "$bool"
# Licence : GNU General Public License, version 3
# Auteur : Progfou <jean-christophe.andre@auf.org>
# Création : 2011-04-26
-# Mise à jour : 2011-04-28
+# Mise à jour : 2011-08-23
-EXPECTED_DEBIAN_VERSION="6.0.1"
+EXPECTED_DEBIAN_VERSION="6.0.2"
ACCEPTED_DEBIAN_VERSION="5.0.8"
-if grep -qE ' Intel.* Xeon| AMD.* Opteron' /proc/cpuinfo ; then
+if grep -q '^flags.* lm ' /proc/cpuinfo ; then
EXPECTED_DEBIAN_ARCH="x86_64"
ACCEPTED_DEBIAN_ARCH="i686"
else
}
display_host() {
- name="$1" ; dist="$2" ; version="$3" ; arch="$4"
+ name="$1" ; dist="$2" ; version="$3" ; arch="$4" ; note="$5"
if [ "${dist}" = "Ubuntu" ] ; then
expected_version="${EXPECTED_UBUNTU_VERSION}"
accepted_version="${ACCEPTED_UBUNTU_VERSION}"
elif [ "${arch}" != "${accepted_arch}" ] ; then
arch="`colorize red "${arch}"`"
fi
- printf "%-25s: %s %s (%s)\n" "${name}" "${dist}" "${version}" "${arch}"
+ if [ "${note}" = "voip" ] ; then
+ if [ "${version}" = "${accepted_version}" ] ; then
+ version="`colorize green "${version}"`"
+ fi
+ note='ne pas migrer vers Squeeze !'
+ fi
+ if expr match "${note}" '.*!' >/dev/null ; then
+ note="`colorize red "${note}"`"
+ fi
+ printf "%-25s: %s %s (%s) %s\n" "${name}" "${dist}" "${version}" "${arch}" "${note}"
}
-display_host "CT 0 (host)" "`lsb_release -si`" "`lsb_release -sr`" "`uname -m`"
+display_host "host" "`lsb_release -si`" "`lsb_release -sr`" "`uname -m`"
if test -x /usr/sbin/vzctl
then
IDS="`vzlist -H -o ctid`"
if [ -n "${IDS}" ] ; then
for id in ${IDS}
do
+ note=""
name="`sed -n '/^NAME=/s/^.*="\?\([^"]*\)"\?.*$/\1/p' /etc/vz/conf/${id}.conf`"
if [ -z "${name}" ] ; then
name="`sed -n '/^HOSTNAME=/s/^.*="\?\([^"]*\)"\?.*$/\1/p' /etc/vz/conf/${id}.conf`"
if [ -n "${dist}" ] ; then
version="`vzctl exec ${id} lsb_release -sr 2>/dev/null`"
else
- dist="(paquet lsb-release manquant)"
- version="???"
+ dist="------"
+ version="-----"
+ note='paquet lsb-release manquant !'
fi
arch="`vzctl exec ${id} uname -m`"
- display_host "CT ${id} (${name})" "${dist}" "${version}" "${arch}"
+ if [ -x "/var/lib/vz/private/${id}/usr/sbin/asterisk" ] ; then
+ note="voip"
+ fi
+ display_host "CT ${id} (${name})" "${dist}" "${version}" "${arch}" "${note}"
done
fi
fi