How to restore and start acpid at boot


Forum: Laptops
Topic: How to restore and start acpid at boot
started by: Juanito

Posted by Juanito on July 28 2006,13:12
I've been playing with ACPI and the acpid daemon to get the suspend states and so on working.

In order to avoid using "apt-get install acpid" each time I startup, how do you backup/restore and run acpid at boot on a USB installtion?

I tried backup/restore of /etc/init.d/acpid and I put the line "/etc/init.d/acpid start" in bootlocal.sh but this doesn't seem to work.

Any ideas?

Posted by roberts on July 28 2006,15:24
Several ideas come to mind...

1, Since acpid is a single simple deb package, you could save this deb package (/var/cache/apt/archives/acpid_1.0.1-3_i386.deb)  just like other MyDSL extensions. And then in /opt/bootlocal.sh add the command dpkg -i /path_to_where_you_saved/acpid_1.0.1-3_i386.deb


2. Or you could do a dpkg -L acpid
Then noting which files you need to add to your .filetool.lst

3. Or you could ...
a)  dpkg -L acpid > acpid.lst
b) Then edit acpid.lst removing the lines with  the docs and man stuff to keep it small
c) tar -T acpid.lst --no-recursion -zcvf acpid.dsl
Now you have made a  simple (no menu, no icon) .dsl out of it. Save this with you other .dsl extensions.

Posted by Juanito on July 29 2006,11:38
I tried option 3, made acpid.dsl and it works [beams with pride] - thanks.

Now onto cpufreqd (Intel Speedstep daemon) which is not a single, simple deb package...

BTW logically, given that DSL 3.0.1 loads the ACPI modules ac, battery, button, fan, processor and thermal at boot, shouldn't it include the acpid daemon and give the option to start it at boot? In the same vein, maybe the next release of DSL could attempt to detect the laptop model and load the appropriate ACPI module - i8k (Dell), asus, toshiba, etc.

Posted by roberts on July 30 2006,17:50
Quote
Now onto cpufreqd (Intel Speedstep daemon) which is not a single, simple deb package...


If multiple deb files are involved then modify the procedure with steps a.1 .. a.n


a.1) dpkg -L another_deb > mynew.lst
...
a.n) dpkg -L another_deb_n >> mydsl.lst

b) Then edit mydsl.lst removing the lines with  the docs and man stuff to keep it small
c) tar -T mydsl.lst --no-recursion -zcvf mdsl.dsl
Now you have made a  simple (no menu, no icon) .dsl out of multiple installed deb packages.  Save this with you other .dsl extensions.

The only difference is the ">>" option to concatenate all the installed deb files into a single .lst file

Posted by Juanito on Sep. 07 2006,12:30
Apologies for the time gap but it took me a while to get round to this...

I tried the above procedure for gcc-2.95 (required to "make dep" after patching the 2.4.26 kernel sources).

By looking at a screen dump after "apt-get install gcc-2.95" when I had an Internet connection, I could see that the following files are required, which I downloaded from debian.org:

binutils_2.12.90.0.1-4_i386.deb
cpp-2.95_2.95.4-11woody1_i386.deb
gcc-2.95_2.95.4-11woody1_i386.deb
gcc_2.95.4-14_i386.deb

After rebooting, and without an Internet connection, I installed dsl-dpkg.dsl and tried "dpkg -L binutils_2.12.90.0.1-4_i386.deb > mynew.lst" but this gave an error that binutils was not installed.

Following this I tried "sudo dpkg -i binutils_2.12.90.0.1-4_i386.deb" which worked but "dpkg -L binutils_2.12.90.0.1-4_i386.deb > mynew.lst" Still gave the error message that binutils was not installed.

Thinking that maybe all of the debs would need to be installed first, I did "sudo dpkg -i cpp-2.95_2.95.4-11woody1_i386.deb" which worked but "sudo dpkg -i gcc-2.95_2.95.4-11woody1_i386.deb" gives an error that it depends on gcc and "sudo dpkg -i gcc_2.95.4-14_i386.deb" gives an error that it depends on gcc-2.95...

I'm a little stuck here - does anybody have any ideas?

Posted by ^thehatsrule^ on Sep. 07 2006,16:05
Yea, you would have to install the ones that the other packages are dependent on first... thought I haven't encountered your problem before.

Previously in the past I have just taken the files from "apt-get install gcc-2.95" and combined it into a gcc-2.95_with_binutils.dsl.  I have just used dpkg -X in the past as well, and have just manually edit the list after.

Posted by Juanito on Sep. 08 2006,09:49
In fact the trick seems to have been to build the dsl with an Internet connection - here's what seems to have worked:

[enable apt from Apps/Tools menu]

apt-get -i gcc-2.95
dpkg -L binutils > /mnt/sda1/mylist.txt
dpkg -L cpp-2.95 > /mnt/sda1/mylist1.txt
dpkg -L gcc > /mnt/sda1/mylist2.txt
dpkg -L gcc-2.95 > /mnt/sda1/mylist3.txt

[open mylist.txt with Beaver and cut & paste contents of mylist1-3.txt into it]
[edit out lines with /doc /man /locale]

tar -T /mnt/sda1/mylist.txt --no-recursion -zcvf /mnt/sda1/optional/gcc-2.95.dsl

After rebooting and loading the newly made gcc-2.95.dsl I was able to "make dep" on a patch of the 2.4.26 kernel sources so I presume it works.

Thanks for the help guys.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.