Jump to content

aru

Members
  • Posts

    2022
  • Joined

  • Last visited

Everything posted by aru

  1. how many sources do urpmi have in your system? the more it has the slower it runs
  2. The init scripts are thougth to start in a certain order, that's why the links to them are numbered (as in /etc/rc5.d/S01blabla, etc/rc5.d/S70blabla). That's because some of those services, in order to work, need other services running before they can start, ie: "nfs" needs "network" and "portmap" (and maybe others) running before "nfs" itself. So order the services you are launching in the sameway they are under the /etc/rc#.d directories For example, a good idea ( :P ) could be: create a /etc/rc.d/quick_boot/ dir and link the init scripts at /etc/rc.d/init.d/ the sameway they are linked in /etc/rc5.d/ (S01blabla, S05foo...); and call them with a script which could be something like this: #!/bin/bash case $1 in start) (sleep 1m && for script in /etc/rc.d/quick_boot/*; do $script start done) &;; stop) for script in /etc/rc.d/quick_boot/*; do $script stop done;; restart) for script in /etc/rc.d/quick_boot/*; do $script restart done;; *) exit 1;; esac BTW, I'm glad to see you around here Omar :D EDITED: check out the code! removed some unwanted blankspaces (sorry, opera is not the best script editor I've used)
  3. well there are dozens of ways of achieving that :roll:, ie: alias gcc=/path/tty_script.sh remember that the script itself calls the compiler. but you are right, 176 compilations in a day seems too much :D
  4. I don't think so, at least not for the vanilla kernel. But things might have changed since the last time I looked for it. If you install the kernel-sources.rpm package you can proceed the same way you did with the vanilla tarball (is the way I do). Also I guess that you can compile the rpm packaged kernel sources with "rpm --recompile package"
  5. The problem is not the way you created your crontab which is perfectly correct. The problem is that cron must know somethings before running shuch kind of program: the PATH to the kmail executable and, since it's a GUI program, the DISPLAY where it has to be executed. check the following link to the old board where we discused a similar problem: http://www.club-nihil.net/mub/viewtopic.php?t=4465
  6. It could be something as simple as this... #!/bin/bash n=0 for i in p q r s t u v w x y z; do for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do tty="/dev/tty$i$j" if [ ! -c ${tty} ]; then mknod -m 666 ${tty} c 3 $n && chown root:tty ${tty} fi n=$((n+1)) done done # call the compiler here with the script's cmd_line args as the compiler args: compiler $@ Glitz, notice that the use of the 'chgrp' command here is unnecessary as 'chown' is able to change both owner and group attributes at once.
  7. I wonder that too :P Anyhow, the script works --tested--, I've edited it again a little bit after reading the mknod man page (seems that the original script was written long time ago).
  8. aru

    Sendmail or postfix?

    When I had to take that decision I found out that postfix was better than sendmail (but I don't remember why and I don't know which is the actual situation)
  9. You'll need to provide us the errors X is having, because w/o them we cannot help you (except if any of us has ever been in the same situation with the same hardware). So you'll need to check the file /var/log/XFree86.0.log and look for lines begining with "EE" (error) and "WW" (warnings) (and maybe with "NI" and "??") If those warnings make no sense to you, you can post the output of the following command here, and see if we can help you: [root@localhost ~]$ egrep -C "EE|WW" /var/log/XFree86.0.log
  10. Since I have no idea of how to create a /dev/tty (maybe tomorrow when I'll be not as tired as I'm now, I'll take a look to the man pages), I've searched a little bit on the web and I've found a script to create ttys.... what I've done with it are some modifications in order to fit your exact needs. The makedev function makes a lot of sense to me, the only command I'm not familiar with is mknod; I'll check its man page tomorrow ;). IMHO this script must do what you want: #! /bin/bash function makedev () { #params: tty_name [bc] major_n minor_n owner group mode [ -c $1 ] && rm -f $1 mknod $1.tmp $2 $3 $4 && chown $5:$6 $1.tmp && chmod $7 $1.tmp && mv $1.tmp $1 } for i in p q r s t u v w x y z do base=$(( $(expr pqrstuvwxyz : ".*$i" - 1 ) * 16)) for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f do n=$(expr 0123456789abcdef : ".*$j" - 1) makedev /dev/tty$i$j c 3 $(($base+$n)) root tty 666 done done exit 0 Hope this helps. side note: # the following code will be even simpler (but the one above is more robust) function makedev() { ... same as above } n=0 for i in p q r s t u v w x y z; do for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do makedev /dev/tty$i$j c 3 $n root tty 666 n=$((n+1)) done done (note: If you cut and paste the scripts make sure that no whitespace is appended at the end of each line... just to avoid some headaches) edited: added the side note (and corrected some engilsh language errors)
  11. Thanks, I didn't know that (infact I don't know any other shell apart of bash) :D
  12. aru

    LILO config

    Sorry if my post annoyed you, but to achieve your fomer question --booting lilo in text mode-- I told you what to do many posts ago: That lilo.conf should have solved your two problems: lilo pointing to the wrong drive, and lilo running in plain-text-mode (at least in my system works!!!!). But then, you re-rewrote your MBR with your other boot loader. So how do you expect lilo working if it is not there any more? Also I never pointed you to look at any "www.google.com / www.f***.com/docs". Indeed I told you, as per your own request, to look to your own harddisk's resources and to read the www.mandrakeuser.org docs. Did you read them? Did you see, at least, which was the url I pointed you to? it was MANDRAKE-U-S-E-R.ORG. Those docs MUST be read by any MANDRAKE - USER that wants to learn anything (you said you wanted -- I'm always glad to see such attitude). Sorry if they are in english, but I don't know of any portuguese translation... maybe you should look to any "Connectiva Linux" documentation/manuals about lilo, but that means pointing you to search in google... Sorry again If my posts didn't help you in anyway.
  13. aru

    LILO config

    I thought that this is what you wrote: I told you HOW should be your lilo.conf file (well, EXACTLY how it MUST be to achieve what you wanted). I told you WHERE to look for the lilo manuals and examples. I told you WHAT to read in order to know what to do to REVERT your actual situation (linux cant boot because of lilo absence -- your fault, not lilo's as you reinstalled your former boot loader when you told us that you wanted to replace it with lilo). cannonfodder TOLD you EXACTLY which are the steps to follow (I didn't do that because of your express quote). so... from my part good luck!
  14. Is it a vanilla kernel? If it is, then there is no way to run supermount on it (if things hasn't changed). Supermount is a Mandrake feature that only works with mandrake's kernels. The errors you get are because the kernel can't understand the supermount's flags that are on your /etc/fstab. You should remove them, by editing that file by hand, or by running "/usr/sbin/supermount -i disable". If you want to re-enable supermount, just put back the 'supermount' flags on your CD and floppy entries or run "/usr/sbin/supermount -i enable". My advice is to remove (or put as a module) everything that you don't need, that will make a light kernel and thus faster. Also you can search for any patches you'll think might improve your system and play with them. If something goes wrong, try again, and again (you have always the mandrake kernel if needed). have fun :wink:
  15. aru

    LILO config

    Well, it's your decission. But if you have some time, my advice, again, is to read this doc: http://www.mandrakeuser.org/docs/admin/pri...rint/recov.html There are explained the vi basics, among other things that you'll need to know to save many headaches.
  16. pretty cool! :D your firewall is even better than my main computer/server/desktop/bla, bla, bla... but that's another history :P
  17. around 8 seconds - opera Any photos of the system?
  18. aru

    LILO config

    I still want:- learn to INSTALL and/or restore lilo (I dont want just you guys say me "do this to fix that". I wanna learn it to solve future problems I myself) Did you see the places where I told you to look at? (all of those docs are already in your harddisk) So, please, tell me why -the hell- did you overwrite the lilo boot loader, that you finally installed, with the other one No, not exactly, as I told you, before reinstalling you should take a look to the "EMERGENCY RECOVERY" docs at www.mandrakeuser.org; exactly at: [*]The Mandrake Linux Rescue System [*]Scenario I: System Doesn't Boot -- exactly where says "...If you are faced with a boot loader failure without having a boot floppy at hand, you have to start one of the external systems..." My advice is that you should read the full "EMERGENCY RECOVERY" doc; here is the link to the printable version: http://www.mandrakeuser.org/docs/admin/pri...rint/recov.html Don't give up, meanwhile you'll learn a lot (That's the best way. Talking from experience) :wink:
  19. aru

    LILO config

    Why??!!! What did you wanted??!!! Now lilo is not confused, simply it is not there anymore!!! you replaced it!!! Come on man! Don't give up!!! check it's man page, it's there!!! man lilo man lilo.conf <- All the options I've used in my example are there. also, you'll find all what you wanted to know doing...: [arusabal@localhost ~]$ locate lilo | egrep "doc|howto" /usr/share/doc/mandrake/es/images/dx-lilo-where.png /usr/share/doc/lilo-21.7.5 /usr/share/doc/lilo-21.7.5/README.common.problems.bz2 /usr/share/doc/lilo-21.7.5/INCOMPAT /usr/share/doc/lilo-21.7.5/README.bz2 /usr/share/doc/lilo-21.7.5/README.graphic.bz2 /usr/share/doc/lilo-21.7.5/CHANGES /usr/share/doc/lilo-21.7.5/QuickInst /usr/share/doc/lilo-21.7.5/README.disk.bz2 /usr/share/doc/lilo-21.7.5/bmp2mdk /usr/share/doc/lilo-21.7.5/COPYING /usr/share/doc/lilo-doc-21.7.5 /usr/share/doc/lilo-doc-21.7.5/User_Guide.ps /usr/share/doc/lilo-doc-21.7.5/Technical_Guide.ps [arusabal@localhost ~]$ Check the /usr/share/doc/lilo-doc-(version)/User_Guide.ps And ofcourse the "info" pages... All that info without even connecting to internet. Man don't give up too soon or you'll miss the fun! :wink: Remember, if lilo fails, there is NO NEED to reinstall, it's just lilo which is failing (not in your case, because lilo is no more there), not the whole system... Check the www.mandrakeuser.org "Emergency Recovery" articles.
  20. EXACTLY the same, both "." and "source" are synonyms in bash. Both are bash builtins, and both are intended to read and execute commands from "filename" (as in "source filename" or ". filename") in the CURRENT SHELL CONTEXT; vs a normal script execution which creates a subshell. chalex20 explained it perfectly Side note: For what I know "." was a Bourne Shell Builtin, and "source" came later as a Bash Builtin, so if you want the maximun portability in a script you should use "." instead of "source" (It's me speaking? :shock: well, it could be comp.unix.shell's fault --- my new 'divetimento' )
  21. I have searched a bit in my system, and this is what I've find out: you'll find:/etc/X11/gdm/PreSession/ /etc/X11/gdm/PostSession/ to place scripts to run before and after the user's session. I think PostSession will be a good place to have a killall script. [*] on xdm you have: /etc/X11/xdm/GiveConsole /etc/X11/xdm/TakeConsole which are scripts with the same function as Pre/PostSession had in gdm; so TakeConsole will be the place to call the killall script. [*] on kdm which is what you are interested in, I have to say sorry, but I have no idea , I don't use neither KDE, nor kdm, but I really hope that those gdm's and xdm's clues will put you in the right path to solve your problem. good luck
  22. probably not with the type of script, but by the way, and which program, is launching it. (sorry, I can't help with kdm, I don't use it due its particular behavior in many things) As I told you, replacing the printer command with a 'launcher' script that's why I suggest the -P option in the lpr command. I see, then you'll need a KDE (kdm) equivalent to user's ~/.bash_logout or ~/.logout or find a way that launching the script ensures the kill when kde exits
  23. cardassianscot, what do you mean with login out? login-out from Gnome? If a user logs in 'only' through gdm (kdm...), then at login-out all it's process are killed. Could you explain a little bit more how does your script work. Edited: Side note: why don't you make a script that starts while the user prints and "stops" just after the printing is done? (IMHO that would be simplier); for example: move your print command (lets say that is /usr/bin/lpr) to /usr/bin/lpr-bin and create a bash (or perl) script like this one: [root@localhost ~]$ mv /usr/bin/lpr usr/bin/lpr-bin [root@localhost ~]$ touch /usr/bin/lpr && chmod +x /usr/bin/lpr then edit the script: [root@localhost ~]$ cat > /usr/bin/lpr #! /bin/bash ARGS="$@" # command line args # or (maybe better): # ARGS=" -Pprinter-name@printer-server $@" USER="$USER" # or USER=$(whoami) init_message="Hi, $USER printer printing" end_message='printer ended its job. Bye!' if [[ "$DISPLAY" ]]; then # behave different in X than in text-mode. ECHO() { echo "$@" | /usr/X11R6/bin/xmessage -file - & } # pops up a window else ECHO() { echo "$@"; } # simple echo fi ECHO "$init_message" /usr/bin/lpr-bin "$ARGS" && ECHO "$end_message" exit 0 That would be much simplier, wouldn't be? (Notice that the code above isn't tested, is just an idea to show what I mean. Keep in mind that is wrote on the fly, so it probably wont work)
  24. IFAIK, It seems that is a problem only with KDE (maybe kdm), and it affects later releases (also AFAIK). I don't use KDE, and I still have Mdk8.1, so I only know this problem from the people who asked solutions in the old board. Never happened to me. Check out this link from kde.org: http://www.kde.org/documentation/faq/confi....html#id2913380 there is where applies the #! /bin/bash at Xsession. But if you check the changelog of the "xinitrc" rpmpackage you'll see that Mdk (also Redhat, if you check their rpm package) changed the #! /bin/bash -login to #! /bin/sh (I don't know the reason) The problem applies to kdm (IMHO) -- I use gdm --
  25. I remember an old project for something related to stars, sky maps... and that stuff. And when I say old I mean 3-4 years, before KDEs and Gnomes... but I don't remember its name, sorry. edited: http://www.gnu.org/software/spacechart/ (maybe was this one but ...I don't remember :P )
×
×
  • Create New...