Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.os.linux.suse    |    Suse is actually not that bad    |    138,051 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 137,637 of 138,051    |
|    Carlos E.R. to Aragorn    |
|    Re: yardstick up my behind    |
|    21 Nov 22 12:38:44    |
   
   From: robin_listas@es.invalid   
      
   On 2022-11-21 03:05, Aragorn wrote:   
   > On 20.11.2022 at 21:58, Carlos E.R. scribbled:   
   >   
   >> On 2022-11-20 15:02, bad sector wrote:   
   >>   
   >>> they are mountpoints for data drive partitions   
   >>   
   >> And they were not mounted. Typical issue, happens millions of times.   
   >>   
   >> You should, in your backup script, verify the mount succeeded.   
   >>   
   >> mount /abc   
   >> MOUNT=`mount | grep /abc`   
   >> if ! test -n "$MOUNT" ; then   
   >> echo "*** ERROR: could not mount, aborting"   
   >> echo   
   >> echo $MOUNT   
   >> exit   
   >> fi   
   >   
   > There's a simpler way, which includes neither the invocation of   
   > mount(1) nor any output redirection into grep(1).   
   >   
   > When you are certain that the volume in question is not mounted, simply   
   > create a single empty file with an indicative name in the directory   
   > intended as the mountpoint, e.g.   
   >   
   >   
   > # touch "${directory}/NOT_MOUNTED"   
   >   
   >   
   > Then, all you have to do later in order to check whether the volume is   
   > mounted or not is test for the existence of said file.   
      
   Yes, I know this method. But it can be "perverted" by creating the flag   
   file in the wrong place, or deleting it.   
      
   Directly checking for the mount is safer. Doesn't depend on other things.   
      
      
   (actually, I use the "not_mounted" flag file for visual indication when   
   using a browser)   
      
   --   
   Cheers, Carlos.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca