On 12/19/2012 4:00 PM, John Hupp wrote:
I'm using a client boot script at
/usr/share/ltsp/init-ltsp.d/50-apcupsd with sed to modify a
configuration file. The script:
sed -i \
-e 's/UPSCABLE usb/UPSCABLE ether/' \
-e 's/UPSTYPE usb/UPSTYPE net/' \
-e 's/DEVICE/DEVICE Lubuntu1:3551/' \
-e 's/TIMEOUT 105/TIMEOUT 60/' \
-e 's/NETSERVER on/NETSERVER off/' \
-e 's/NISIP 0.0.0.0/NISIP 127.0.0.1/' \
/etc/apcupsd/apcupsd.conf
It all works fine except for this substitution:
-e 's/DEVICE/DEVICE Lubuntu1:3551/'
It takes this line:
DEVICE
and replaces it with this:
DEVICE Lubuntu1:3551 Lubuntu1:3551
However, if I run the same script on the server, it does not produce
the duplicate "Lubuntu1:3551". Does anyone know why?
-------------------------------------
Seeking a work-around, I added an /etc/apcupsd/apcupsd_slave.conf file
which was already modified with the parameters I want clients to boot
with. Then I edited /usr/share/ltsp/init-ltsp.d/50-apcupsd to remove
the sed command and added:
cp /etc/apcupsd/apcupsd_slave.conf /etc/apcupsd/apcupsd.conf
But this does not seem to execute. And if on a booted-up client I
open a local session xterminal and run:
$ su root cp /etc/apcupsd/apcupsd_slave.conf /etc/apcupsd/apcupsd.conf
it returns:
/bin/cp: cannot execute binary file
Someone points out that with the sed command, I would get the duplicate
result I report if the script ran twice. Does that trigger any thoughts?
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_____________________________________________________________________
Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto:
https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help, try #ltsp channel on irc.freenode.net