Changeset 661

Show
Ignore:
Timestamp:
07/04/08 14:50:18 (5 months ago)
Author:
free
Message:
  • desktop

. fixed wrong key in gdm theme configuration

  • server

. add cups script for sharing printers with samba

Location:
cdd-utils/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • cdd-utils/trunk/debian/changelog

    r655 r661  
    1 cdd-utils (0.12.4) 64studio; urgency=low 
     1cdd-utils (0.12.5) 64studio; urgency=low 
    22 
    33  * [lib]: 
     
    66        . added icon function 
    77        . custom eboard icon 
    8      - desktop: fixed wrong key in gdm theme configuration 
     8     - desktop 
     9        . fixed wrong key in gdm theme configuration 
     10     - server 
     11        . add cups script for sharing printers with samba 
    912  * [bin] 
    1013     - qjackctl-wrapper: hide qjack's main window at startup 
  • cdd-utils/trunk/lib/server.sh

    r610 r661  
    471471} 
    472472 
     473# Description: share printers 
     474# Depends: samba 
     475cups () { 
     476    cfg=/etc/samba/smb.conf 
     477    if ! exists $cfg; then warning $cfg not found; return; fi 
     478    unc_key "load printers" ";" "$cfg" 
     479    set_key "load printers" " = " "yes" "$cfg" 
     480    unc_key "printing = cups" ";" "$cfg" 
     481    unc_key "printcap name = cups" ";" "$cfg" 
     482    perl -e 'open(FILE, "/etc/samba/smb.conf"); while ($line = <FILE>) {if ($line =~ /^\[print\$\]/) {print $line; while ($line !~ /^# Uncomment to allow/) {$line = <FILE>}; print $line } else {print $line}};close(FILE);'> $cfg.tmp 
     483    mv $cfg.tmp $cfg 
     484 
     485    position="\[print\$\]" 
     486    insert="\ \ \ comment = All Printers\n   browseable = no\n   path = /tmp\n   printable = yes\n   public = yes\n   writable = no\n   create mode = 0700\n   printcap name = /etc/printcap\n   print command = /usr/bin/lpr -P%p -r %s\n   printing = cups" 
     487    sed -i -e "\|^$position| a $insert" $cfg 
     488}