cifs - "execute when mounted" not working

Discussion in 'Tomato Firmware' started by rs232, Mar 13, 2011.

  1. rs232

    rs232 Network Guru Member

    I have this command in the cifs1/execute when mounted field

    PATH=/cifs1:$PATH; export PATH

    but it doesn't seem to be working... is anybody using such field to execute system commands?
  2. maurer

    maurer Network Guru Member

    yes - for me it works to start transmission on the cifs
  3. bkmo

    bkmo LI Guru Member

    I would think that statement would be valid only for that shell, and would not affect the global path. Is this the only command you are invoking from the /execute field?
  4. rs232

    rs232 Network Guru Member

    That could be a point. I did some investigation and apparently busybox is not using bash. It is suggested though to write an /etc/profile file instead (equivalent of .bash_profile) but neither /etc nor /tmp/etc are writeable in tomato...
  5. teddy_bear

    teddy_bear Network Guru Member

    If you're using Tomato USB or any mod based on Tomato USB (any recent Toastman or Victek builds), /jffs/etc/profile and /opt/etc/profile are automatically added to the main profile if present - you can put your PATH statement there.
  6. rs232

    rs232 Network Guru Member

    Thanks teddy_bear, that solved my problem. This is what I did:

    1) formatted + mounted jffs
    2) created the dir /jffs/etc
    3) changed the cifs1 "execute when mounted" into:
    echo "PATH=\$PATH/cifs1" >/jffs/etc/profile
    Not it works like a charm.

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice