From: Stelian P. <st...@po...> - 2005-01-24 11:40:15
|
On Sat, Jan 22, 2005 at 12:26:05PM +0100, Stelian Pop wrote: > On Sat, Jan 22, 2005 at 12:32:27AM -0800, Kenneth Porter wrote: > > > --On Saturday, January 22, 2005 8:46 AM +0100 Stelian Pop > > <st...@po...> wrote: > > > > >The reason you didn't get this with older versions of restore is > > >because older versions of restore didn't even bother to compare > > >directories *at all*. Now that restore does, we have this special > > >case of mountpoints, and I'm not sure what's the best solution here. > > > > Can you tell whether it's a mount point? If so, then just reporting that is > > sufficient, given the way everything works. I just didn't recognize those > > as mount points without having them pointed out, since I don't normally pay > > attention to those particular ones. > > Well, dump does contain that logic, but in its own code, not in the > common part, so it's not usable directly by restore. I'll see if it's > possible to dig that code out and reuse it. After a second thought, this is a bit more complicated that it seems: What if the "hidden" directory does contain some files ? Dump will see them but restore will not. Should restore report compare errors or should it detect that the files are "hidden" ? I would go with the kiss approach here (keep it simple, stupid), and do nothing about those files. Those who want the warning messages to go away must correct the permission by hand: - ls -l /mountpoint -> remember ownership and file mode - boot on some alternative media (rescue cd etc) -> depending on the filesystem being mounted, you can either do this immediately, or by going single user, or rebooting on a rescue CD for the "system" ones (/dev/shm, /proc, /sys, /dev etc) - umount /mountpoint - chown owner:group /mountpoint - chmod newmode /mountpoint In other words, let restore report whatever errors it sees (we can easily explain to the users), instead of hacking a "solution" which could led to other questions from users we might not be able to answer :) Stelian. -- Stelian Pop <st...@po...> |