Modify

Opened 7 years ago

Last modified 4 years ago

#7908 accepted defect

uShare is enabled if disabled and the other way around

Reported by: anonymous Owned by: jow
Priority: low Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: uShare Cc:

Description

OpenWrt Version: Build from trunk r22982

If i configure ushare with luci-app-ushare (0.9+svn6252-1) and do not check the "Enable" checkbox uShare is working, there are multiple ushare processes running and the shared files are accessable over the network.
The generated /etc/config/ushare file is:

config 'ushare'
        option 'username' 'nobody'
        option 'interface' 'br-lan'
        option 'disable_telnet' '1'
        option 'disable_webif' '1'
        option 'servername' 'router'
        option 'content_directories' '/home/Movies'

But if the "Enable" checkbox is checked there are no ushare processes running and the generated config file is the following:

config 'ushare'
        option 'username' 'nobody'
        option 'interface' 'br-lan'
        option 'disable_telnet' '1'
        option 'disable_webif' '1'
        option 'servername' 'router'
        option 'content_directories' '/home/Movies'
        option 'enabled' '1'

So, without the option 'enabled' '1' uShare is working - with the option it is not working.

Attachments (0)

Change History (5)

comment:1 Changed 7 years ago by jow

  • Owner changed from developers to jow
  • Status changed from new to accepted

comment:2 Changed 7 years ago by realopty

After doing some testing, I cant reproduce this from the package 'uShare' its self. the enabled option works correctly. Id say it has to do with luci-app-ushare

comment:3 Changed 7 years ago by realopty

Ive just tested luci-app-ushare in a virtualmachine. I could not reproduce this bug. The enable option works correctly.

however i did discover that ushare will run even if the 'option enabled 1' dosnt exist in the ushare config?

comment:4 Changed 7 years ago by anonymous

I can confirm that it does not depend on the enabled option.

It looks like a problem with the init.d-script.
"/etc/init.d/ushare restart" works only every second time. (So it only looked like toggling the option would be the problem).

root@router:~# cat /var/run/ushare.pid
13971
root@router:~# ps | grep ushare
13991 root      1424 S    grep ushare
root@router:~# /etc/init.d/ushare restart
no /usr/bin/ushare found; none killed
root@router:~# cat /var/run/ushare.pid
13997
root@router:~# ps | grep ushare
13997 nobody    5052 S    /usr/bin/ushare -n router -i br-lan -c /home/Movies
13998 nobody    5052 S    /usr/bin/ushare -n router -i br-lan -c /home/Movies
13999 nobody    5052 S    /usr/bin/ushare -n router -i br-lan -c /home/Movies
14001 nobody    5052 S    /usr/bin/ushare -n router -i br-lan -c /home/Movies
14002 nobody    5052 S    /usr/bin/ushare -n router -i br-lan -c /home/Movies
14003 nobody    5052 S    /usr/bin/ushare -n router -i br-lan -c /home/Movies
14005 nobody    5052 S    /usr/bin/ushare -n router -i br-lan -c /home/Movies
14006 nobody    5052 S    /usr/bin/ushare -n router -i br-lan -c /home/Movies
14009 root      1424 S    grep ushare
root@router:~# /etc/init.d/ushare restart
stopped /usr/bin/ushare (pid 13997)
root@router:~# /usr/bin/ushare is already running
13997

root@router:~# cat /var/run/ushare.pid
13997
root@router:~# ps | grep ushare
14017 root      1424 S    grep ushare
root@router:~# /etc/init.d/ushare restart
no /usr/bin/ushare found; none killed
root@router:~# cat /var/run/ushare.pid
14023
root@router:~# ps | grep ushare
14023 nobody    5052 S    /usr/bin/ushare -n router -i br-lan -c /home/Movies
14024 nobody    5052 S    /usr/bin/ushare -n router -i br-lan -c /home/Movies
14025 nobody    5052 S    /usr/bin/ushare -n router -i br-lan -c /home/Movies
14027 nobody    5052 S    /usr/bin/ushare -n router -i br-lan -c /home/Movies
14028 nobody    5052 S    /usr/bin/ushare -n router -i br-lan -c /home/Movies
14029 nobody    5052 S    /usr/bin/ushare -n router -i br-lan -c /home/Movies
14031 nobody    5052 S    /usr/bin/ushare -n router -i br-lan -c /home/Movies
14032 nobody    5052 S    /usr/bin/ushare -n router -i br-lan -c /home/Movies
14035 root      1424 S    grep ushare
root@router:~#

comment:5 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as accepted .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.