home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.linux.ubuntu      I preferred Xubuntu, seemed a bit faster      134,474 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 134,302 of 134,474   
   Dan Purgert to rsutton   
   Re: I still don't understand sudo proper   
   08 Jul 25 15:15:25   
   
   From: dan@djph.net   
      
   On 2025-07-08, rsutton wrote:   
   > Hi all,   
   > The following code runs fine in the VM from the terminal:   
   > sudo su -   
   > mount -t 9p config /mnt   
   > cd /mnt   
   > ./install.sh   
   > exit   
   >   
   > However, when I converted the commands to my bash script and try to run   
   > this code , it fails:   
   > cd /mnt   
   > sudo mount -t 9p config /mnt   
   > sudo /mnt/install.sh   
   >   
   > The error it gives me is:   
   > "This script must be run from within the 9p mount"   
   >   
   > Can someone explain how I can accomplish the intent of this code?   
      
   Well, in the working code, your current working directory is the one   
   that contains the install script; whereas the non-working code, you are   
   calling the explicit path (which sort of implies you are "somewhere   
   else").   
      
   Chances are the script does a bunch of things relative to the current   
   working directory, and it performs a check to ensure that its execution   
   path is also the current working directory.   
      
      
   --   
   |_|O|_|   
   |_|_|O| Github: https://github.com/dpurgert   
   |O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1  E067 6D65 70E5 4CE7 2860   
      
   --- SoupGate-DOS v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca