Wind River Support Network

HomeDefectsLIN1018-3287
Fixed

LIN1018-3287 : running "chkconfig iptables on" messes up the startup levels of os services

Created: Dec 27, 2018    Updated: Mar 7, 2019
Resolved Date: Jan 10, 2019
Previous ID: LIN6-15185
Found In Version: 10.18.44.2
Fix Version: 10.18.44.3
Severity: Severe
Applicable for: Wind River Linux LTS 18
Component/s: Userspace

Description

When trying to enable iptables at boot time by running chkconfig it was seen that all startup scripts were re-ordered.


Workaround

A user could manually create a symlink rather than using chkconfig.

Steps to Reproduce

Originally reported on RCPL 17 it has also been reproduced on the latest RCPL.

1. Use the attached script to create a project with the customer's usual configuration, excluding custom layers.

    $ ./asml-config-no-ps-layers-latest-rcpl.sh

2. Add the two additional packages needed.

    $ make -C build chkconfig.addpkg
    $ make -C build iptables.addpkg

3. Build

    $ make fs

4. Boot the target, qemu works.

    $ make start-target

5. Log in and run the test steps as shown here:

Wind River Linux 6.0.0.37 qemu0 console

qemu0 login: root
Password:
root@qemu0:~# cd /etc/rc3.d/
root@qemu0:/etc/rc3.d# ls -l > ~/rc3-default.txt
root@qemu0:/etc/rc3.d# chkconfig iptables on
root@qemu0:/etc/rc3.d# ls -l > ~/rc3-chkconfig.txt
root@qemu0:/etc/rc3.d# cd
root@qemu0:~# diff rc3-default.txt rc3-chkconfig.txt
2c2
< lrwxrwxrwx 1 root root 16 Nov  8 13:45 S02dbus-1 -> ../init.d/dbus-1
---
> lrwxrwxrwx 1 root root 18 Nov  8 13:51 S08iptables -> ../init.d/iptables
4,5d3
< lrwxrwxrwx 1 root root 20 Nov  8 13:44 S10networking -> ../init.d/networking
< lrwxrwxrwx 1 root root 17 Nov  8 13:45 S12rpcbind -> ../init.d/rpcbind
7d4
< lrwxrwxrwx 1 root root 19 Nov  8 13:45 S19nfscommon -> ../init.d/nfscommon
10,12d6
< lrwxrwxrwx 1 root root 20 Nov  8 13:44 S20hwclock.sh -> ../init.d/hwclock.sh
< lrwxrwxrwx 1 root root 21 Nov  8 13:44 S20irqbalanced -> ../init.d/irqbalanced
< lrwxrwxrwx 1 root root 19 Nov  8 13:45 S20nfsserver -> ../init.d/nfsserver
14c8,19
< lrwxrwxrwx 1 root root 22 Nov  8 13:45 S21avahi-daemon -> ../init.d/avahi-daemon
---
> lrwxrwxrwx 1 root root 22 Nov  8 13:51 S50avahi-daemon -> ../init.d/avahi-daemon
> lrwxrwxrwx 1 root root 15 Nov  8 13:51 S50crond -> ../init.d/crond
> lrwxrwxrwx 1 root root 16 Nov  8 13:51 S50dbus-1 -> ../init.d/dbus-1
> lrwxrwxrwx 1 root root 20 Nov  8 13:51 S50hwclock.sh -> ../init.d/hwclock.sh
> lrwxrwxrwx 1 root root 21 Nov  8 13:51 S50irqbalanced -> ../init.d/irqbalanced
> lrwxrwxrwx 1 root root 20 Nov  8 13:51 S50networking -> ../init.d/networking
> lrwxrwxrwx 1 root root 22 Nov  8 13:51 S50rmnologin.sh -> ../init.d/rmnologin.sh
> lrwxrwxrwx 1 root root 17 Nov  8 13:51 S50rpcbind -> ../init.d/rpcbind
> lrwxrwxrwx 1 root root 23 Nov  8 13:51 S50stop-bootlogd -> ../init.d/stop-bootlogd
> lrwxrwxrwx 1 root root 19 Nov  8 13:51 S50tcf-agent -> ../init.d/tcf-agent
> lrwxrwxrwx 1 root root 19 Nov  8 13:51 S51nfscommon -> ../init.d/nfscommon
> lrwxrwxrwx 1 root root 19 Nov  8 13:51 S52nfsserver -> ../init.d/nfsserver
17d21
< lrwxrwxrwx 1 root root 15 Nov  8 13:45 S90crond -> ../init.d/crond
20,22d23
< lrwxrwxrwx 1 root root 22 Nov  8 13:44 S99rmnologin.sh -> ../init.d/rmnologin.sh
< lrwxrwxrwx 1 root root 23 Nov  8 13:44 S99stop-bootlogd -> ../init.d/stop-bootlogd
< lrwxrwxrwx 1 root root 19 Nov  8 13:44 S99tcf-agent -> ../init.d/tcf-agent

As you can see, not only is the new iptables script added but all of the other scripts S numbers have changed, resulting in a different start order.

This is probably due to chkconfig not using the start info in the header of each script.
Live chat
Online