cp -l inside script on a cifs partition not working after Slack upgrade
Hi all,
After upgrade from Slackware-13.37 to 14.0, an old script of mine stopped working, and I can't find the reason.
The setup is this:
In /opt, bin is a symlink to another place in the same disk.
Inside /opt/bin, there's the script that used to work fine.
/opt/bin/update_bds is another symlink: update_bds -> /mnt/pw710103/update_bds/
In /etc/fstab:
//pw710103/Update_bds /mnt/pw710103/update_bds cifs auto,users,username=m688,password=your,workgroup=pw710103,rw,uid=1001,gid=users,file_mode=0664,dir_m ode=0774,ip=10.5.24.122 0 0
The part of the script that is causing the problem is this:
++ pwd
+ echo /opt/bin/update_bds/cadastro
/opt/bin/update_bds/cadastro
for file in novos/*.[cC][sS][vV]
cp -l "$file" "./"
+ cp -l novos/bb.csv ./
cp: cannot create hard link «./bb.csv» to «novos/bb.csv»: No such file or directory
I also tried to use full paths, but the problem is the same.
In the script, if I use `mv` or just `cp` instead of `cp -l`, there is no problem.
In the command line, in the same directory, `cp -l` works well too.
In Slackware-13.37, this used to work fine.
Was there any change to `cp -l` or to any bash environmental variable that causes this in the new 14.0 Slackware version?
What else can it be?
|