Suddenly it wont work anymore...
Hi all
Yesterday i made a script with funtions, everything worked until 15 minutes ago, and i can't figure out what did go wrong. I think it has to do something with the 3 first rules of code... but for my opinion that should be fine (i used '777' just to be sure) Code:
test_mount() { why do i use all those variables? because they are defined at the beginning of the script, so i have only one place to change them if needed. i think the rest is clear? probably there is a better way to check mounts, but this is just a quick solution (which isn't working anymore xD :doh:) so if anyone has a suggestion or something else, i'll be happy to hear it from you Kind regards |
appearently he doesn't make the file...
he has to do that on a remote server this is the pre-defined touch command Code:
touch="/bin/touch" Code:
# which touch Code:
# which touch i just don't understand why he doesn't make that file can someone help me pls?! Kind regards |
okay guys, update...
he WON'T make a file in the root (/) but he will make it in (let's say) /tmp ... so in other words /current_mount -> NO /tmp/current_mount -> YES then i thought let's do a Code:
chmod 777 / can someone PLS explain why? |
You are polluting the root (/) directory with files. Also / is only writable by root, so you can't write files there as a normal user.
You could extract the mount points from /etc/fstab. The currently mounted directories are also available from /etc/mtab and /proc/mounts/. |
Quote:
it's just the shortest way, anyways... I'm executing everything as root, so... but i'll see what /etc/fstab, /etc/mtab and /proc/mounts give me -> which file do you prefer, i mean which is the most accurate? |
All times are GMT -5. The time now is 11:54 PM. |