1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-13 03:03:15 +00:00
freebsd-ports/net/xsmbrowser/files/patch-aa
Pav Lucistnik fa01a4cfa3 - Update to 3.4.0
PR:		ports/67869
Submitted by:	Stefan Walter <sw@gegenunendlich.de>
Approved by:	maintainer timeout (14 days)
2004-06-29 17:39:11 +00:00

202 lines
11 KiB
Plaintext

--- xsmbrowser.orig Sun May 6 04:56:08 2001
+++ xsmbrowser Sat Jun 12 10:59:28 2004
@@ -1,12 +1,12 @@
-#!/usr/bin/expectk -f
+#!%%PREFIX%%/bin/expectk -f
# xSMBrowser - Samba GUI that emulates Network Neighborhood
# You are free to modify this code under the GPL License
# The following "default_pixmap_dir" specifies where xsmbrowser
# looks for the pixmaps the first time it starts ... i.e. this is
# only for people making rpm-type packages!
-set default_pixmaps_dir "pixmaps"
-# you might change this to /usr/share/pixmaps/xsmbrowser, for example
+set default_pixmaps_dir "%%PREFIX%%/share/xsmbrowser"
+# you might change this to %%PREFIX%%/share/xsmbrowser, for example
proc UserFileExist {} {
##############################################
@@ -25,7 +25,7 @@
set filequeue [file exists "~/.xsmbrowser-queue"]
if {$filemain == "0"} {
set userfile [open "~/.xsmbrowser-config" w 0600]
- puts $userfile "# Values defined in /etc/xsmbrowser-config take first priority."
+ puts $userfile "# Values defined in %%PREFIX%%/etc/xsmbrowser/xsmbrowser-config take first priority."
puts $userfile "#"
puts $userfile "Timeout = 90"
puts $userfile "Image Path = $default_pixmaps_dir"
@@ -43,7 +43,7 @@
}
if {$filenets == "0"} {
set userfile [open "~/.xsmbrowser-networks" w 0600]
- puts $userfile "# Networks in /etc/xsmbrowser-networks are read first."
+ puts $userfile "# Networks in %%PREFIX%%/etc/xsmbrowser/xsmbrowser-networks are read first."
puts $userfile "#"
puts $userfile ":Samba Config"
puts $userfile "Type = broadcast"
@@ -63,7 +63,7 @@
}
if {$filefavs == "0"} {
set userfile [open "~/.xsmbrowser-favorites" w 0600]
- puts $userfile "# Favorites and mounts in /etc/xsmbrowser-favorites are read first."
+ puts $userfile "# Favorites and mounts in %%PREFIX%%/etc/xsmbrowser/xsmbrowser-favorites are read first."
puts $userfile "#"
puts $userfile ":Your Computer"
puts $userfile "Type = ip_only"
@@ -94,7 +94,7 @@
}
if {$filecommands == "0"} {
set userfile [open "~/.xsmbrowser-commands" w 0600]
- puts $userfile "# Commands in /etc/xsmbrowser-commands are read first."
+ puts $userfile "# Commands in %%PREFIX%%/etc/xsmbrowser/xsmbrowser-commands are read first."
puts $userfile "#"
puts $userfile ":Netscape"
puts $userfile "Types = .HTM .HTML .SHTML"
@@ -1071,6 +1071,9 @@
if {[file exists "/etc/smb.conf"] != "0"} {
puts "Reading /etc/smb.conf ..."
set userfile [open "/etc/smb.conf" r]
+ } elseif {[file exists "/usr/local/etc/smb.conf"] != "0"} {
+ puts "Reading /usr/local/etc/smb.conf ..."
+ set userfile [open "/usr/local/etc/smb.conf" r]
} elseif {[file exists "/usr/local/samba/etc/smb.conf"] != "0"} {
puts "Reading /usr/local/samba/etc/smb.conf ..."
set userfile [open "/usr/local/samba/etc/smb.conf" r]
@@ -1170,8 +1173,8 @@
set global_exist "yes"
gets $userfile line
} else {
- if [file exists /etc/xsmbrowser-config] {
- set userfile [open "/etc/xsmbrowser-config" r]
+ if [file exists %%PREFIX%%/etc/xsmbrowser/xsmbrowser-config] {
+ set userfile [open "%%PREFIX%%/etc/xsmbrowser/xsmbrowser-config" r]
set global_exist "yes"
gets $userfile line
}
@@ -1218,8 +1221,8 @@
gets $userfile line
set m $file_place(networks_m)
} else {
- if [file exists /etc/xsmbrowser-networks] {
- set userfile [open "/etc/xsmbrowser-networks" r]
+ if [file exists %%PREFIX%%/etc/xsmbrowser/xsmbrowser-networks] {
+ set userfile [open "%%PREFIX%%/etc/xsmbrowser/xsmbrowser-networks" r]
set global_exist "yes"
gets $userfile line
}
@@ -1291,8 +1294,8 @@
set m $file_place(favorites_m)
set p $file_place(mount_fav_m)
} else {
- if [file exists /etc/xsmbrowser-favorites] {
- set userfile [open "/etc/xsmbrowser-favorites" r]
+ if [file exists %%PREFIX%%/etc/xsmbrowser/xsmbrowser-favorites] {
+ set userfile [open "%%PREFIX%%/etc/xsmbrowser/xsmbrowser-favorites" r]
set global_exist "yes"
gets $userfile line
}
@@ -1386,8 +1389,8 @@
gets $userfile line
set m $file_place(commands_m)
} else {
- if [file exists /etc/xsmbrowser-commands] {
- set userfile [open "/etc/xsmbrowser-commands" r]
+ if [file exists %%PREFIX%%/etc/xsmbrowser/xsmbrowser-commands] {
+ set userfile [open "%%PREFIX%%/etc/xsmbrowser/xsmbrowser-commands" r]
set global_exist "yes"
gets $userfile line
}
@@ -1438,7 +1441,7 @@
global env_name
puts "Writing config (.xsmbrowser-*) ..."
set userfile [open "~/.xsmbrowser-config" w]
- puts $userfile "# Values defined in /etc/xsmbrowser-config take first priority."
+ puts $userfile "# Values defined in %%PREFIX%%/etc/xsmbrowser/xsmbrowser-config take first priority."
puts $userfile "#"
if {$user_name_default != ""} {
puts $userfile "Username = $user_name_default"
@@ -1456,7 +1459,7 @@
puts $userfile "EOF"
close $userfile
set userfile [open "~/.xsmbrowser-networks" w]
- puts $userfile "# Networks in /etc/xsmbrowser-networks are read first."
+ puts $userfile "# Networks in %%PREFIX%%/etc/xsmbrowser/xsmbrowser-networks are read first."
puts $userfile "#"
if {[array exists networks_m] == 1} {
set m [expr 1 + $file_place(networks_m)]
@@ -1494,7 +1497,7 @@
puts $userfile "EOF"
close $userfile
set userfile [open "~/.xsmbrowser-favorites" w]
- puts $userfile "# Favorites and mounts in /etc/xsmbrowser-favorites are read first."
+ puts $userfile "# Favorites and mounts in %%PREFIX%%/etc/xsmbrowser/xsmbrowser-favorites are read first."
puts $userfile "#"
if {[array exists favorites_m] == 1} {
set m [expr 1 + $file_place(favorites_m)]
@@ -1560,7 +1563,7 @@
puts $userfile "EOF"
close $userfile
set userfile [open "~/.xsmbrowser-commands" w]
- puts $userfile "# Commands in /etc/xsmbrowser-commands are read first."
+ puts $userfile "# Commands in %%PREFIX%%/etc/xsmbrowser/xsmbrowser-commands are read first."
puts $userfile "#"
if {[array exists commands_m] == 1} {
set m [expr 1 + $file_place(commands_m)]
@@ -7171,17 +7174,17 @@
$helpwindow.text.area insert end "When xSMBrowser is first started, it creates four important files in the\n"
$helpwindow.text.area insert end "home directory: \".xsmbrowser-config\", \".xsmbrowser-networks\",\n"
$helpwindow.text.area insert end "\".xsmbrowser-favorites\", and \".xsmbrowser-commands\". These files can be\n"
- $helpwindow.text.area insert end "made global to all users by placing them in the /etc directory (minus the\n"
- $helpwindow.text.area insert end "period, e.g. \"~/.xsmbrowser-config\" --> \"/etc/xsmbrowser-config\"). When\n"
- $helpwindow.text.area insert end "xSMBrowser starts, it will read both files in /etc and ~, but definitions\n"
- $helpwindow.text.area insert end "in /etc take precedence. To get the most flexibility from this, the\n"
+ $helpwindow.text.area insert end "made global to all users by placing them in the %%PREFIX%%/etc/xsmbrowser directory (minus the\n"
+ $helpwindow.text.area insert end "period, e.g. \"~/.xsmbrowser-config\" --> \"%%PREFIX%%/etc/xsmbrowser/xsmbrowser-config\"). When\n"
+ $helpwindow.text.area insert end "xSMBrowser starts, it will read both files in %%PREFIX%%/etc/xsmbrowser and ~, but definitions\n"
+ $helpwindow.text.area insert end "in %%PREFIX%%/etc/xsmbrowser take precedence. To get the most flexibility from this, the\n"
$helpwindow.text.area insert end "following should be carefully read.\n"
$helpwindow.text.area insert end "\n"
$helpwindow.text.area insert end "a) Config\n"
$helpwindow.text.area insert end "-------------------------------\n"
$helpwindow.text.area insert end "The .xsmbrowser-config file contains various setup settings. Looking at\n"
$helpwindow.text.area insert end "this file, the most important settings are as follows.\n"
- $helpwindow.text.area insert end " Image Path = /usr/share/pixmaps/xsmbrowser\n"
+ $helpwindow.text.area insert end " Image Path = %%PREFIX%%/share/xsmbrowser\n"
$helpwindow.text.area insert end " Smbmount = yes 1\n"
$helpwindow.text.area insert end " Execute = kfmclient folder \$MOUNTPOINT\n"
$helpwindow.text.area insert end "\n"
@@ -7191,20 +7194,20 @@
$helpwindow.text.area insert end "b) Networks\n"
$helpwindow.text.area insert end "-------------------------------\n"
$helpwindow.text.area insert end "This is the config file that usually gets the most attention. Networks\n"
- $helpwindow.text.area insert end "defined in /etc will appear before user-defined networks in xSMBrowser's\n"
- $helpwindow.text.area insert end "main screen. Networks can generally be transfered strait over to /etc,\n"
+ $helpwindow.text.area insert end "defined in %%PREFIX%%/etc/xsmbrowser will appear before user-defined networks in xSMBrowser's\n"
+ $helpwindow.text.area insert end "main screen. Networks can generally be transfered strait over to %%PREFIX%%/etc/xsmbrowser,\n"
$helpwindow.text.area insert end "just make sure to rid of any passwords.\n"
$helpwindow.text.area insert end "\n"
$helpwindow.text.area insert end "c) Favorites\n"
$helpwindow.text.area insert end "-------------------------------\n"
$helpwindow.text.area insert end "Favorites can also be defined globally. One could put commonly accessed\n"
$helpwindow.text.area insert end "computers here. Again, make sure there are not any passwords still\n"
- $helpwindow.text.area insert end "present in /etc/xsmbrowser-favorites after copying it over.\n"
+ $helpwindow.text.area insert end "present in %%PREFIX%%/etc/xsmbrowser/xsmbrowser-favorites after copying it over.\n"
$helpwindow.text.area insert end "\n"
$helpwindow.text.area insert end "d) Commands\n"
$helpwindow.text.area insert end "-------------------------------\n"
$helpwindow.text.area insert end "Instead of making users scour for programs, one could enter some of the\n"
- $helpwindow.text.area insert end "more common programs in the /etc/xsmbrowser-commands file.\n"
+ $helpwindow.text.area insert end "more common programs in the %%PREFIX%%/etc/xsmbrowser/xsmbrowser-commands file.\n"
$helpwindow.text.area insert end "\n"
$helpwindow.text.area insert end "III. Networking Ideas\n"
$helpwindow.text.area insert end "===============================\n"
@@ -7237,7 +7240,7 @@
$helpwindow.text.area insert end "c) Multiple Networks\n"
$helpwindow.text.area insert end "-------------------------------\n"
$helpwindow.text.area insert end "Using the above ideas, you could create two or three networks to place in\n"
- $helpwindow.text.area insert end "/etc/xsmbrowser-networks. The resulting names might look like the\n"
+ $helpwindow.text.area insert end "%%PREFIX%%/etc/xsmbrowser/xsmbrowser-networks. The resulting names might look like the\n"
$helpwindow.text.area insert end "following.\n"
$helpwindow.text.area insert end " * CAS Main Network\n"
$helpwindow.text.area insert end " * CAS Network Backup (1) \<--- uses known master browser\n"