LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-15-2012, 07:41 AM   #1
lupe
Member
 
Registered: Dec 2008
Distribution: Slackware, FreeBSD, NetBSD, Haiku
Posts: 60

Rep: Reputation: 2
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?
 
Old 10-16-2012, 01:50 PM   #2
valdinei
LQ Newbie
 
Registered: Jul 2012
Location: Brazil
Distribution: Ubuntu, Freebsd, CentOS
Posts: 17

Rep: Reputation: Disabled
Compatibility between files systems ...
I understand cp -l is a alias for ln correct?

Check permission of ./
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HowTo convert Primary Partition to Logical (ie move it inside the Extended Partition) Tom6 Linux - Software 3 11-29-2010 03:40 PM
Runs Multiple shell script inside a main script using crontab srimal Linux - Newbie 4 10-22-2009 06:19 PM
How to get full path to script file inside script itself? And in case of sym links? maggus Linux - Newbie 3 05-28-2009 08:40 AM
Slack 11.0 - mount -t cifs gives error, not supported by system sickboylives Slackware 3 12-17-2007 01:55 PM
i get an error message running php script inside a cgi script. repolona Linux - Software 0 02-22-2007 09:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration