xyj70 / fusionpbx

Automatically exported from code.google.com/p/fusionpbx
0 stars 0 forks source link

cp -R on install creates link if conf is a symlink #102

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. cp -R /etc/freeswitch conf.orig
2.
3.

What is the expected output? What do you see instead?
Expect to see a copy of the Freeswitch config directory, instead I see a sym 
link.

What version of the product are you using? On what operating system?
R1222 on OpenWRT

Please provide any additional information below.
I set a symlink to the freeswitch conf directory in /usr/share/freeswitch (to 
align with non-OpenWRT layout). When FusionPBX does its install.php cp 
operation, the result is a symlink from conf.orig to the FS conf directory 
instead of copying the directory contents. Using cp -RL corrects this 
behaviour. The same behaviour occurs on Debian, and is also corrected with the 
suggested fix

Original issue reported on code.google.com by gerrit308 on 7 Jun 2011 at 4:02

GoogleCodeExporter commented 9 years ago
A fuller set of steps:
In /usr/share/freeswitch, create a link to conf, i.e. ln -s /etc/freeswitch conf
Then cp -R conf conf.orig to simulate install.php operation

Using cp -RL produces the desired copy of the original FreeSwitch directory

Original comment by gerrit308 on 7 Jun 2011 at 4:05

GoogleCodeExporter commented 9 years ago
After a bit more thinking and experimenting, cp -RLp would be even better as it 
retains the original create date.

Original comment by gerrit308 on 7 Jun 2011 at 9:33

GoogleCodeExporter commented 9 years ago
Added in revision 1229

Original comment by markjcrane@gmail.com on 8 Jun 2011 at 12:45