On Tue, 2 Aug 2011, Ritesh Raj Sarraf wrote: > On 08/02/2011 12:10 AM, Cristian Ionescu-Idbohrn wrote: > > failed (disabled, not active). > > ... > > failed (enabled, not active). > > > > Package promises much, but is (sadly) unusable :( Thus removed. > 22:55:01 rrs@champaran:~/devel/apt-offline/apt-offline (debian)$ sudo > /etc/init.d/laptop-mode restart > [sudo] password for rrs: > Disabling laptop mode...done (8514 disabled, not active). > Enabling laptop mode...done (enabled, not active). > 01:20:27 rrs@champaran:~/devel/apt-offline/apt-offline (debian)$ sudo > /etc/init.d/laptop-mode restart > Disabling laptop mode...done (20610 disabled, not active 20610). > Enabling laptop mode...done (20610 enabled, active 20610).
Lucky you :) > > Now, it's essential scripting stuff. You just don't do: > > > > return 0; > > > > Maybe: > > > > exit 0 > > > > which would mean "ignore all errors that may have occured", but how > > smart would that be? > Exactly. Can you test and report this? I don't need to test that. It's pretty basic. > > Just skip that all together and handle errors as they may occur, > > instead. That would be smarter, indeed. > This would be better. I haven't tested what the default return is. > If you can test, that'll be great. With the new 1.58 release, the > last snippet in the laptop_mode script is the lm-polling-daemon > invocation. Now its exit status could be different depending on the > various circumstances (number of events, invocations etc). So you > testing will help here. Alright. I'll try something tonight. > > That script is in a deplorable hackish state :( I doubt _all_ > > those forked subshells '(...)' are really necessary, for example. > > Would you be intrested in getting patches? Is there a debian > > repository you keep the code in? > Yes. https://github.com/rickysarraf/laptop-mode-tools Thanks. That would be: $ git clone git://github.com/rickysarraf/laptop-mode-tools.git wouldn't it? > > Kernel: Linux 2.6.39-2-686-pae (SMP w/2 CPU cores) > > Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) > > Shell: /bin/sh linked to /bin/bash > Debian defaults to dash. And that is what laptop-mode-tools tries to > adhere to. Well, you'll have to adhere to whatever "the best of both worlds" may be, and it will "just work" (tm). > But that doesn't mean it shouldn't work with bash. That would be my point too. > Can you try with dash as your system default shell? I'll see what I can do. You obviously did not test with bash. Do you plan to? Cheers, -- Cristian -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org