usr bin perl This file must be executable to work use strict exit if A

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#!/usr/bin/perl
# This file must be executable to work!
use strict;
exit if $#ARGV < 0;
my $server = $ARGV[0];
my $options="-fstype=fuse,nodev,nosuid,nonempty,noatime,allow_other,max_read=65536,connect_timeout=10,transform_symlinks";
my $default = "rw,codepage=cp1251,iocharset=utf-8"; # Note the read-only defaults.
# WARNING: Storing passwords here is probably insecure on multi-user systems!
my %servers = (
# "ftp.example.tld" => "$default,user=username:password",
"ftp5.natm.ru" => "utf8",
);
my $custom = $servers{$server} || $default;
$options .= "," . $custom if defined $custom && $custom ne "";
print "$options :curlftpfs\\#$server\n";