[D-community-commits] r69 - in trunk/fai-config-dir/scripts:
ADMINGROUP DEFAULT
Holger Levsen
h01ger-guest at alioth.debian.org
Sat Mar 24 16:52:18 CET 2007
Author: h01ger-guest
Date: 2007-03-24 15:52:18 +0000 (Sat, 24 Mar 2007)
New Revision: 69
Modified:
trunk/fai-config-dir/scripts/ADMINGROUP/30-sudoers
trunk/fai-config-dir/scripts/DEFAULT/20-fai-softupdate-script
Log:
dont run the shell script with sudo, only the command which needs it
Modified: trunk/fai-config-dir/scripts/ADMINGROUP/30-sudoers
===================================================================
--- trunk/fai-config-dir/scripts/ADMINGROUP/30-sudoers 2007-03-24 15:46:08 UTC (rev 68)
+++ trunk/fai-config-dir/scripts/ADMINGROUP/30-sudoers 2007-03-24 15:52:18 UTC (rev 69)
@@ -12,14 +12,14 @@
any::
### holger
{ ${target}/etc/sudoers
- AppendIfNoSuchLine "holger ALL= NOPASSWD: /usr/local/sbin/fai-softupdate"
+ AppendIfNoSuchLine "holger ALL= NOPASSWD: /usr/sbin/fai -N softupdate"
}
### madduck
{ ${target}/etc/sudoers
- AppendIfNoSuchLine "madduck ALL= NOPASSWD: /usr/local/sbin/fai-softupdate"
+ AppendIfNoSuchLine "madduck ALL= NOPASSWD: /usr/sbin/fai -N softupdate"
}
### luk
{ ${target}/etc/sudoers
- AppendIfNoSuchLine "luk ALL= NOPASSWD: /usr/local/sbin/fai-softupdate"
+ AppendIfNoSuchLine "luk ALL= NOPASSWD: /usr/sbin/fai -N softupdate"
}
Modified: trunk/fai-config-dir/scripts/DEFAULT/20-fai-softupdate-script
===================================================================
--- trunk/fai-config-dir/scripts/DEFAULT/20-fai-softupdate-script 2007-03-24 15:46:08 UTC (rev 68)
+++ trunk/fai-config-dir/scripts/DEFAULT/20-fai-softupdate-script 2007-03-24 15:52:18 UTC (rev 69)
@@ -5,14 +5,17 @@
# GPL2 licenced
#
-cat << 'EOF' > $target/usr/local/sbin/fai-softupdate
+cat << 'EOF' > $target/usr/local/bin/fai-softupdate
#!/bin/sh
-nice fai -N softupdate
+[ -e /tmp/fai-softupdate-running ] && { echo "fai softupdate running" ; exit 1 }
+touch /tmp/fai-softupdate-running
+nice sudo fai -N softupdate
[ -s /var/log/fai/current/error.log ] || exit 0
echo
echo /var/log/fai/current/error.log contains:
echo
cat /var/log/fai/current/error.log
+rm /tmp/fai-softupdate-running
EOF
-chmod 544 $target/usr/local/sbin/fai-softupdate
+chmod 744 $target/usr/local/bin/fai-softupdate
More information about the D-community-commits
mailing list