Jump to content

Ric

Members
  • Posts

    42
  • Joined

  • Last visited

Posts posted by Ric

  1. Can any one tell me how to read variables from a text file so they can be used with in a bash script

     

    ie text file has

     

     
    serverone_host=amber 
    serverone_ip=10.0.0.1 
    servertwo_host=green 
    servertwo_ip=10.0.0.2 
    and so on

     

    bash file picks out the different variables so rather then having to edit a load of scrips i would only have to edit the text file each time i deploy a system

     

    gee i am asking the question and that doesn't make sense to me hope it make sense to some one out there

     

    Regards

     

    Ric

  2. quick reply

     

    presuming you are wanting a filtered transparent proxy

     

    change the shorewall rules /etc/shorewall/rules

    so thet the line

     

    REDIRECT loc 3128 tcp www

    is

    REDIRECT loc 8080 tcp www

     

    8080 is the default port for dansguardian

     

    then restart shorewall

     

    in the /etc/squid/squid.conf

    add if they are not there already

     

    httpd_accel_host virtual

    httpd_accel_with_proxy on

    httpd_accel_uses_host_header on

    httpd_accel_port 80

     

    restart squid

     

    and all should be well

     

    if that dosnt work ild post my squid.conf file after i get back from work

     

    Regards

     

    Ric

  3. Hi I hope some one can help me, I use a perl script to make logon scripts for my samba domain,

     

     
    #! /usr/bin/perl 
    
    # Generate a custom logon script when a user 
    # logs into the network 
    
    open LOGON, ">/home/share/netlogon/$ARGV[0].bat"; 
       print LOGON "\@echo on \r\n"; 
       print LOGON "IF EXIST F: NET USE F: /DELETE /y\r\n"; 
       print LOGON "IF EXIST H: NET USE H: /DELETE /y\r\n"; 
       print LOGON "IF EXIST I: NET USE I: /DELETE /y\r\n"; 
       print LOGON "IF EXIST J: NET USE J: /DELETE /y\r\n"; 
       print LOGON "IF EXIST T: NET USE T: /DELETE /y\r\n"; 
       print LOGON "IF EXIST S: NET USE S: /DELETE /y\r\n"; 
       print LOGON "IF EXIST R: NET USE R: /DELETE /y\r\n"; 
       print LOGON "IF EXIST K: NET USE K: /DELETE /y\r\n"; 
       print LOGON "IF EXIST V: NET USE V: /DELETE /y\r\n"; 
       print LOGON "IF EXIST W: NET USE W: /DELETE /y\r\n"; 
       print LOGON "IF EXIST U: NET USE U: /DELETE /y\r\n"; 
       print LOGON "IF EXIST X: NET USE X: /DELETE /y\r\n"; 
       print LOGON "IF EXIST F: NET USE F: /DELETE /y\r\n"; 
       print LOGON "NET TIME \\\\$ARGV[1] /SET /YES\r\n"; 
     #  print LOGON "NET USE H: /HOME\r\n"; 
       print LOGON "NET USE I: \\\\$ARGV[1]\\Students\r\n"; 
       print LOGON "NET USE J: \\\\$ARGV[1]\\Learning\r\n"; 
    #    print LOGON "NET USE T: \\\\$ARGV[1]\\Applications\r\n"; 
    #    print LOGON "NET USE S: \\\\$ARGV[1]\\BootImages\r\n"; 
       print LOGON "NET USE R: \\\\$ARGV[1]\\applications\r\n"; 
       if ($ARGV[2] eq "teachers") { 
           print LOGON "NET USE K: \\\\$ARGV[1]\\Teachers\r\n"; 
           print LOGON "NET USE V: \\\\$ARGV[1]\\AdminStudents\r\n"; 
       } 
       if ($ARGV[2] eq "admin") { 
           print LOGON "NET USE K: \\\\$ARGV[1]\\Teachers\r\n"; 
           print LOGON "NET USE V: \\\\$ARGV[1]\\AdminStudents\r\n"; 
           print LOGON "NET USE W: \\\\$ARGV[1]\\AdminTeachers\r\n"; 
       } 
    #    print LOGON "deltree /y c:\\windows\\profiles\\* \r\n"; 
    print LOGON "if not \"%OS%\"==\"Windows_NT\" GOTO NT9x\r\n"; 
    print LOGON ":NTOS\r\n"; 
    print LOGON "echo \"Windows NT\"\r\n"; 
    print LOGON "echo printers\r\n"; 
    print LOGON "\\\\$ARGV[1]\\netlogon\\con2prt.exe /f\r\n"; 
    print LOGON "regedit /s printerpatch.reg\r\n"; 
    print LOGON "logonprinters.vbs\r\n"; 
    print LOGON "NET USE H: \\\\$ARGV[1]\\$ARGV[0]\r\n"; 
    print LOGON "GOTO END\r\n"; 
    print LOGON ":NT9x\r\n"; 
    print LOGON "echo \"Windows 9x\"\r\n"; 
    print LOGON "if exist \"c:\\WINDOWS\\PROFILES\\\" deltree /y c:\\windows\\profiles\\*\r\n"; 
    print LOGON "NET USE H: /HOME\r\n"; 
    print LOGON "if not exist c:\\windows\\proguard.exe copy \\\\$ARGV[1]\\Netlogon\\ProGuard.exe c:\\windows\r\n"; 
    print LOGON "del c:\\windows\\*.pwl\r\n"; 
    print LOGON "c:\\windows\\proguard.exe\r\n"; 
    print LOGON "R:\\packages\\INTERCHK\\W95Inst\\setup -inl -a\r\n"; 
    print LOGON "start /wait r:\\packages\\INTERCHK\\Savagent.exe -update -poll=3600\r\n"; 
    print LOGON "GOTO END\r\n"; 
    print LOGON ":END\r\n"; 
    print LOGON "echo \"DONE!!\"\r\n"; 
    print LOGON "EXIT\r\n"; 
     
    #        print LOGON "pause\r\n"; 
    close LOGON;

     

    This all works very well however i now want to be able to test which lab a machine is in

    the machines are all names lab1-01, lab1-02, lab2-01 etc.

     

    now to the question does anyone know how i can do a 'if' command that only looks at the 1st 5 letters of the machine name (the lab1 bit)

     

    The machine name is passed to the script as $ARGV[3]

     

     

    hope that makes sense

     

    regards

     

    Ric

  4. Can some one help me with a script that can read a list of full names, then strip all but the first 3 letters of the first name and join it to the the surname to make a username.

     

    ie Full Name richard smith --- becomes ricsmith

     

    unless there is already a user called ricsmith in which case it would make richsmith .

     

    then run the useradd command :

     

    useradd -d /home/ricsmith -g some_group -p (get a password from some other file)

     

    then out print out the fullname, username and password to yet another file .

     

     

    Dose any of that even make sense. :wall:

     

    Thanks for any help.

     

    Ric

  5. Thanks for the reply, I have since taken that card back to the shop and swapped it for a pinnacle pctv rave card, now i can get a picture but only static for sound dose anybody have any experiance with this card/thoughts ideas (dose this now need a new thread)

     

    Ric

  6. I have being messing about with the loki setup program trying to make a installer,

    I have got the installer compiled and working all exept the menu entrys in kde, where it hoses my menu and i have to run menudrake to get it back, has anybody else had this, or any idears how to fix it

     

    Regards

     

    Ric

  7. Does any one know how to get heretic 2 running in mandrake 9.1, I have gone thru the lgfaq with no joy heres what i get in the console

     

    Registered 11 signal handlers
    
    
    
    ========================== Heretic II ===========================
    
    
    
    Added packfile /usr/local/games/heretic2/base/htic2-0.pak (4347 files)
    
    Executing global default.cfg
    
    Could not find /home/rickles/.loki/heretic2/config.cfg
    
    Unable to exec config.cfg
    
    NET Initialized
    
    Loaded DLL /usr/local/games/heretic2/base/client_effects.so as 0x8a26a50
    
    Setting default sound support "snd_sdl.so"
    
    Loaded DLL /usr/local/games/heretic2/snd_sdl.so as 0x8a26e48
    
    Console initialized.
    
    VID: initial refresh glx
    
    Loading /usr/local/games/heretic2/ref_glx.so
    
    Loaded DLL /usr/local/games/heretic2/ref_glx.so as 0x8a29f48
    
    Initializing VID module
    
    ref_gl version: GL 2.0
    
    Glimp_Init(...): +++++++++++++++++
    
    Loaded DLL /usr/lib/libGL.so.1 as 0x8a2c0d8
    
    Setting mode x11 for device mouse
    
    Initialized 640x480 16bit 60Hz display
    
    Got GLX context 640x480 0byte pp/bits/rgb 0
    
    BEGIN R_SetMode()
    
    R_SetMode() - CDS not allowed with this driver
    
    Initializing OpenGL display
    
    END R_SetMode(): mode set
    
    GL_VENDOR: NVIDIA Corporation
    
    GL_RENDERER: GeForce4 MX 440 with AGP8X/AGP/SSE/3DNOW!
    
    GL_VERSION: 1.4.0 NVIDIA 43.21
    
    GL_EXTENSIONS: GL_ARB_imaging GL_ARB_multitexture GL_ARB_point_parameters GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_transpose_matrix GL_ARB_vertex_program GL_ARB_window_pos GL_S3_s3tc GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_compiled_vertex_array GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_packed_pixels GL_EXT_paletted_texture GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shared_texture_palette GL_EXT_stencil_wrap GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_add GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_object GL_EXT_vertex_array GL_IBM_texture_mirrored_repeat GL_KTX_buffer_region GL_NV_blend_square GL_NV_fence GL_NV_fog_distance GL_NV_light_max_exponent GL_NV_packed_depth_stencil GL_NV_pixel_data_range GL_NV_point_sprite GL_NV_register_combiners GL_NV_texgen_reflection GL_NV_texture_env_combine4 GL_NV_texture_rectangle GL_NV_vertex_array_range GL_NV_vertex_array_range2 GL_NV_vertex_program GL_NV_vertex_program1_1 GL_NVX_ycrcb GL_SGIS_generate_mipmap GL_SGIS_multitexture GL_SGIS_texture_lod
    
    Internal signal handler called...
    
    HereticII Heretic II Linux 1.06
    
    Built with glibc-2.1
    
    ... received Signal 11 (SIGSEGV): Segmentation violation (ANSI) ...
    
    SIGSEGV: attempting graceful exit...
    
    Stack dump:
    
    {
    
            0x8097805 :                                   heretic2 [0x8097805]
    
           0x401405ce :                 /lib/i686/libpthread.so.0 [0x401405ce]
    
           0x401ad3b8 :                       /lib/i686/libc.so.6 [0x401ad3b8]
    
    }
    
    Please send a full bug report to support@lokigames.com
    
    Shutting down sound.
    
    Shutting down input handling
    
    Shutting down sound.
    
    
    
    Thanks for playing Heretic II!

     

    any idear

  8. ut has installed in a fashon but it has not decomressed the maps,

     

    Q: UT appears to have installed properly, but the game keeps complaining about a missing 'Entry' and exiting!

    A: Under some circumstances (such as using an unsupported CD), the maps are not uncompressed during the installation. The opening screen of Unreal Tournament is actually a map, called "Entry", which should be named usr/local/games/ut/Maps/Entry.unr if this file is missing, the installation was not successful and you should make sure that you are using the correct installer for your CD. If the file is present but is named Entry.unr.uz, it is still compressed. Since the maps were not shipped on the retail UT CD in a compressed format, you are either trying to use a GOTY CD (or one of the other, unsupported, Unreal Tournament releases) with the regular installer, or the uncompression step failed. If you have a number of .uz files in your /usr/local/games/ut/Maps/ directory, you will need to uncompress them after the installation. A description for doing so follows:

     

    #!/bin/sh

    # FILENAME: convert.sh

    #

    # Change this to YOUR install-dir of UT

    #

    INSTALLDIR=/usr/local/games/ut

     

    cd $INSTALLDIR/System

     

    for i in ../Maps/*.unr.uz

    do

      ucc decompress $i -nohomedir

    done

     

    mv *.unr ../Maps

     

    cd ../Maps

    for f in *.unr

    do

      rm $f.uz

    done

     

    echo "..:: Done! ::.."

     

    stright from the lgfaq (just to keep Dolson happy) :oops:

     

    that fix the problem for me

     

    hope it helps

     

    regards

     

    Rickles

  9. im just a stalker,

    Hey there. I really hate WineX now. I want NATIVE Linux games, so I don't  

    plan to do much work on my WineX tutorial.

     

    However.... I would be interested if you could copy-paste me the output  

    (errors) so I could see if it's something I have encountered before.

     

    I will find the WineX RPM for you now.

     

    Lemme go look.

     

    ...

     

     

    I clicked the link, and it started downloading the file, so it should work  

    for you. Use a download manager like NT or someting.

     

    http://mdkxp.by-a.com/rpm/winex-cvs-200502-1.i586.rpm

     

    You will probably also need a program to generate your ~/.wine/config file.  

    Here is my home site, and you can find winesetuptk.rpm in my list of RPMs:

     

     

     

    Hope it works for you.

     

    --  

    D. Olson

    The Mandrake eXPerience

    http://mdkxp.by-a.com/

     

    MUB-NWN

    http://nwn.by-a.com/

     

    WinXP - the best thing since induced vomitting.

     

    its being sitting in my email archive for a year,

    ohh how I look back on those days when http://mdkxp.by-a.com/ still worked and u didnt have to route round the keyboard for the ~ sign that has rubbed off.

     

    Regards

     

    Rickles

×
×
  • Create New...