Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (3) </ [1] 2 3 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: How to install the cron on DSL< Next Oldest | Next Newest >
kennyfung Offline





Group: Members
Posts: 29
Joined: Feb. 2004
Posted: Oct. 29 2004,02:12 QUOTE

Hi,
   I have a problem. I use dpkg-restore and apt-get install cron. I have successful to download cron but it cannot install at DSL. Some error message show on the display" Error ...(2)".
It exits the installation process. I found that the cron install on the subdirectory. Also I found the link redirect to /KNOPPIX/etc...". But I try to run the cron command. It promises that the cron.cfg read only file. Anybody can help me solve the problem? I want to use the DSL to build a control system. I need to schedule some job to process at different timeslot.
Back to top
Profile PM 
AwPhuch Offline





Group: Members
Posts: 1404
Joined: April 2004
Posted: Oct. 29 2004,04:20 QUOTE

Cron is already built into it

/etc/crontab...just edit that

Brian
AwPhuch


--------------
http://www.frappr.com/dsl <-- Where do you use DSL?
http://www.smoothwall.org <-- Ultimate firewall for the world!
http://boinc.mundayweb.com/one/stats.php/userID:6107 <--My BOINC stats!
./S99LinuxRevolution start
Back to top
Profile PM WEB 
clacker Offline





Group: Members
Posts: 570
Joined: June 2004
Posted: Oct. 29 2004,15:04 QUOTE

Kennyfung, are you trying to install cron from the liveCD or the hard drive?  I just tried it from the liveCD (0.8.3) and I got the same errors you did.  You need to add back the function xargs.  Can you run the gnu-util dsl on a hard drive install?  or apt-get the necessary files.  This is all you need to do for the hard drive install.

The second error was a liveCD only error and was due to the fact that cron needs to add a group, but dsl doesn't let you add users and groups by default.  If you are running from the live cd, my suggestion would be to use my adduser.sh script.
DO NOT RUN THIS SCRIPT FROM A HARD DRIVE INSTALL, YOU DO NOT NEED IT

Code Sample
#!/bin/bash
rm /etc/passwd-
rm -f /etc/passwd.org
cp /KNOPPIX/etc/passwd- /etc/passwd-
cp /KNOPPIX/etc/passwd.org /etc/passwd.org
rm -f /etc/gshadow
rm -f /etc/gshadow-
rm -f /etc/shadow.org
cp /KNOPPIX/etc/gshadow /etc/gshadow
cp /KNOPPIX/etc/gshadow- /etc/gshadow-
cp /KNOPPIX/etc/shadow.org /etc/shadow.org
rm -f /etc/group-
rm -f /etc/group.org
cp /KNOPPIX/etc/group- /etc/group-
cp /KNOPPIX/etc/group.org /etc/group.org


As far as using cron from the liveCD after apt-getting it, you need to start it up first.  I just typed /etc/init.d/cron start to do that (you only need to do that if you're on the liveCD or you just loaded cron, check to see if it's already running with ps -ax).  No error and you can see it running with a ps -ax command.  Now set a system variable so that cron knows which editor to use.  From a bash shell type:

export VISUAL=scite

to use scite as your crontab editor.  You could use any editor you want, I like scite myself.  Now edit a crontab file by typing crontab -e  Here is an example crontab file that appends the current time to a file every minute:

Code Sample
# minute (0-59 or *)
# hour (0-23 or *)
# day (1-31 or *)
# month (1-12 or *)
# day of week (0-6 6=Sunday)
* * * * * date >> /home/dsl/crontest



view your crontab file using crontab -l  You should be rockin' and rollin'
Back to top
Profile PM 
kennyfung Offline





Group: Members
Posts: 29
Joined: Feb. 2004
Posted: Nov. 02 2004,07:06 QUOTE

Hi clacker,
             Thank for your suggestion. I installed the cron successfully. My process is that:
1. cp -Rp /KNOPPIX/* /mnt/hda1/DSL-sys //I copied all the whole system into the system.
2. chroot /mnt/hda1/DSL-sys
3. dpkg-restore
4. apt-get install cron
5 I edit the /etc/crontab file
6. Run cron start ---O.K
I compress the Damnsmall to Live CD. I use Live CD to bootup and run cron start. The following error message shows on screen:
cron: can't open or create /var/run/cron.pid: Read-only file system.
The problem is that it run the /etc/init.d/cron script file. And the file will call the /var/run/cron.pid. This link will route to /KNOPPIX/var/run/crond.pd. This will be accessed the LIVE CD file. It unlike the directory /home. The /home subdirectory will built on the ramdisk. How can I solve the problem. Thanks!
Back to top
Profile PM 
clacker Offline





Group: Members
Posts: 570
Joined: June 2004
Posted: Nov. 02 2004,16:49 QUOTE

kennyfung,  I think your problem might be that you tried to run cron during the remstering process.  Leave out your step #6 and you should be fine.  I did the following and my liveCD started up cron without any error:

make a source directory like you did before
move these three files to that directory:
       dsl-dpkg.dsl
       gnu-utils.dsl
       the deb file for cron from debian
chroot source/KNOPPIX    # this was my directory
mount -t proc /proc proc
mydsl-load dsl-dpkg.dsl
mydsl-load gnu-utils.dsl
dpkg -i cron_3.0pl1-86_i386.deb
rm dsl-dpkg.dsl
rm gnu-utils.dsl
rm cron_3.0pl1-86_i386.deb
umount proc
<CTRL> D

you were probably fine with what you did before only you started cron running in the remaster.  It starts on it's own.  don't run it before you boot the remastered disk.  You might be able to use crontab to edit the crontab file, I'm not sure.

Good luck with your project.  Let us know how it goes.
Back to top
Profile PM 
13 replies since Oct. 29 2004,02:12 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (3) </ [1] 2 3 >/
reply to topic new topic new poll
Quick Reply: How to install the cron on DSL

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code