Actually the bug is in the interface, not in the script. So the "good" workaround is to launch this command:
# gconftool-2 --type string --set /apps/gnome-power-manager/buttons/lid_ac "nothing"
Which correctly sets the closing action to "Do nothing". After this is set you will see "Do nothing" in the configuration applet if you re-open it.
Actually the bug is in the interface, not in the script. So the "good" workaround is to launch this command: power-manager/ buttons/ lid_ac "nothing"
# gconftool-2 --type string --set /apps/gnome-
Which correctly sets the closing action to "Do nothing". After this is set you will see "Do nothing" in the configuration applet if you re-open it.