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,303 of 134,474   
   Richard Kettlewell to rsutton   
   Re: I still don't understand sudo proper   
   08 Jul 25 18:15:34   
   
   From: invalid@invalid.invalid   
      
   rsutton  writes:   
   > Hi all,   
   > I've been using linux (Ubuntu/Mint mainly) for 20 years and I still   
   > find things that I don't understand.  I need some help!   
   >   
   > I have a need to run the following code after generating a virtual   
   > machine in LXD.  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   
      
   After this your current working directory is the /mnt directory in the   
   root filesystem.   
      
   > sudo mount -t 9p config /mnt   
      
   After the mount command, the path /mnt refers to the root of the 9p   
   filesystem (whatever that is). But your current working directory   
   remains the (now hidden) /mnt directory of the root filesystem.   
      
   So the answer is to move the ‘cd’ command in your script one line down.   
      
   > sudo /mnt/install.sh   
   >   .   
   >   .   
   >   
   > The error it gives me is:   
   > "This script must be run from within the 9p mount"   
      
   --   
   https://www.greenend.org.uk/rjk/   
      
   --- 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