What's new

Entware rc.func not found

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Demontager

New Around Here
I tried to install shadowsocks to ASUS-RT3100 by following github manual and found that install script cannot complete because an error in /opt/etc/init.d/S02haveged

Code:
admin@RT-AC3100-4060:/tmp/home/root# sh -c "$(wget https://cdn.jsdelivr.net/gh/Acris/shadowsocks-asuswrt-merlin@master/tools/install.sh -O -)"
--2022-11-06 15:49:23--  https://cdn.jsdelivr.net/gh/Acris/shadowsocks-asuswrt-merlin@master/tools/install.sh
Resolving cdn.jsdelivr.net... 2606:4700::6810:5614, 104.16.87.20, 104.16.85.20, ...
Connecting to cdn.jsdelivr.net|2606:4700::6810:5614|:443... failed: Network is unreachable.
Connecting to cdn.jsdelivr.net|104.16.87.20|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-sh]
Saving to: 'STDOUT'

-                                             [ <=>                                                                               ]   3.40K  --.-KB/s    in 0s     

2022-11-06 15:49:25 (15.4 MB/s) - written to stdout [3479]

 Checking installation environment...
git version 2.34.3
opkg version f2166a89b7e96e2c60002959731eebc5f45fa318 (2020-05-07)
 Installing required packages...
Downloading https://bin.entware.net/armv7sf-k2.6/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/entware
Package shadowsocks-libev-ss-redir (3.3.5-5) installed in root is up to date.
Package haveged (1.9.18-1) installed in root is up to date.
Package unbound-daemon (1.16.1-1) installed in root is up to date.
Package ipset (7.15-2) installed in root is up to date.
Package iptables (1.4.21-3) installed in root is up to date.
/opt/etc/init.d/S02haveged: .: line 10: can't open '/opt/etc/init.d/rc.func'
admin@RT-AC3100-4060:/tmp/home/root#

After checking install.sh i see it has 39 line where it wish to start haveged

Code:
......
echo -e "$ansi_green Installing required packages... $ansi_std"
  opkg update
  opkg upgrade
  opkg install shadowsocks-libev-ss-redir haveged unbound-daemon ipset iptables
  /opt/etc/init.d/S02haveged start
......


Contents of S02haveged
Code:
# cat /opt/etc/init.d/S02haveged
#!/bin/sh

ENABLED=yes
PROCS=haveged
ARGS="-w 1024 -d 32 -i 32 -v 1"
PREARGS=""
DESC=$PROCS
PATH=/opt/sbin:/opt/bin:/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

. /opt/etc/init.d/rc.func

If i start it manually
Code:
admin@RT-AC3100-4060:/tmp/home/root# /opt/etc/init.d/S02haveged start
/opt/etc/init.d/S02haveged: .: line 10: can't open '/opt/etc/init.d/rc.func'

I tried to remove and install haveged again, but same error.
Yeah, rc.func does not exists as error says, so what should i do to fix that?
 
/opt/etc/init.d/rc.func is a core component of Entware. If it doesn't exist on your router then you either haven't installed Entware correctly or it's corrupted.
 
Then now looking where the fault is...
amtm says i got Entware up and running.
Code:
 amtm 3.4 FW               by thelonelycoder
 RT-AC3100 (armv7l) FW-386.5 @ 192.168.1.1
    The Asuswrt-Merlin Terminal Menu         

 ep manage   Entware packages

 fd run      Format disk         fdl show log

 i  show     all available scripts or tools
 u  check    for script updates

    amtm options
 e  exit      t  theme   r  reset   a  about
_____________________________________________

 Entware packages updated and upgraded
_____________________________________________

 Enter option  ep
_____________________________________________

 Entware package options

 This router runs Entware armv7sf-k2.6
 See available packages list here:
 https://bin.entware.net/armv7sf-k2.6/Packages.html

 1. Update and upgrade Entware packages
 2. Show installed Scripts and Entware packages

 Enter selection [1-2 e=Exit]
 
Then now looking where the fault is...
amtm says i got Entware up and running.

Well, that's not what AMTM is actually saying. The message I see is:

_____________________________________________

Entware packages updated and upgraded
_____________________________________________
Entware is a software package repository so it cannot be "up & running" as if it were itself a service. Also, note that when AMTM runs to "update and upgrade Entware packages," I highly doubt that it also checks whether the file "/opt/etc/init.d/rc.func" is actually found & verified to be OK.

As @ColinTaylor already pointed out, your problem seems to be that the file "/opt/etc/init.d/rc.func" either does not exist or is corrupted. In any case, this suggests that Entware needs to be reinstalled from scratch because we don't know what else might not be properly set up or working in your current Entware installation.

Bottom line, completely delete your current "entware" folder and reinstall using AMTM.
 
I know it's not a service, just meant that i did vanilla installation which looks very straightforward. No even have an idea how to try to install it in another way.
Anyway i have reinstalled Entware again as you suggested, e.g formatted 16GB USB3 Pendrive and created single ext4 partition, it not helped, entire system does not know about rc.func file

Code:
admin@RT-AC3100-4060:/tmp/home/root# find / -iname rc*
/sbin/rc
/sbin/rcheck
/tmp/etc/strongswan.d/charon/rc2.conf
/usr/etc/strongswan.d/charon/rc2.conf
/usr/share/strongswan/templates/config/plugins/rc2.conf
admin@RT-AC3100-4060:/tmp/home/root#

Screenshot 2022-11-07 at 16.44.58.png
 
I know it's not a service, just meant that i did vanilla installation which looks very straightforward. No even have an idea how to try to install it in another way.
Anyway i have reinstalled Entware again as you suggested, e.g formatted 16GB USB3 Pendrive and created single ext4 partition, it not helped, entire system does not know about rc.func file

Code:
admin@RT-AC3100-4060:/tmp/home/root# find / -iname rc*
/sbin/rc
/sbin/rcheck
/tmp/etc/strongswan.d/charon/rc2.conf
/usr/etc/strongswan.d/charon/rc2.conf
/usr/share/strongswan/templates/config/plugins/rc2.conf
admin@RT-AC3100-4060:/tmp/home/root#

View attachment 45273
Are you installing entware through AMTM? If not, the recommended method is to use AMTM method to do such. Most people now are only familiar with using AMTM to install entware.
 
Similar threads

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top