[Touch-packages] [Bug 1827172] Re: update-rc.d: enabling or disabling S runlevel services incorrectly modifies runlevel
The fix was released in sysv-rc 2.88dsf-41ubuntu6.3+esm1 for Trusty ESM. ** Changed in: sysvinit (Ubuntu Trusty) Status: In Progress => Fix Released ** Changed in: sysvinit (Ubuntu) Status: New => Won't Fix -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to sysvinit in Ubuntu. https://bugs.launchpad.net/bugs/1827172 Title: update-rc.d: enabling or disabling S runlevel services incorrectly modifies runlevel Status in sysvinit package in Ubuntu: Won't Fix Status in sysvinit source package in Trusty: Fix Released Bug description: [Impact] * update-rc.d, in sysv-rc-2.88dsf-41ubuntu6.3 is broken in trusty. * update-rc.d incorrectly modifies symlinks when enabling or disabling services which are started on the "S" runlevel. * This can lead to services being changed from S runlevel from where they would be started on boot, to "0" runlevel, and are run on halt, which is incorrect. * The bug is caused by trying to use the runlevel to index into an integer array of runlevels. When the runlevel in question is "S", an error is printed Argument "S" isn't numeric in array element at /usr/sbin/update-rc.d line 232. Perl then sets the index to default to 0, which changes the runlevel. * The fix is to check if the runlevel is "S", and if it is, set the index to 99 which conforms with other expected usages for the "S" runlevel in the script. See the "startstop" and "makelinks" subroutines. [Test Case] * You can reproduce this with any service that is started on the "S" runlevel. We will use open-iscsi for an example. 1) Install open-iscsi $ sudo apt install open-iscsi 2) Check to see symlinks for init.d scripts are set to defaults: root@trusty-openiscsi:/etc# ls -l /etc/rc[0123456S].d/*iscsi* /etc/rc0.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rcS.d/S45open-iscsi -> ../init.d/open-iscsi 3) Use update-rc.d to enable open-iscsi service root@trusty-openiscsi:/etc# update-rc.d open-iscsi enable update-rc.d: warning: start runlevel arguments (none) do not match open-iscsi Default-Start values (S) update-rc.d: warning: stop runlevel arguments (none) do not match open-iscsi Default-Stop values (0 1 6) Argument "S" isn't numeric in array element at /usr/sbin/update-rc.d line 232. Enabling system startup links for /etc/init.d/open-iscsi ... Removing any system startup links for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi /etc/rc1.d/K81open-iscsi /etc/rc6.d/K81open-iscsi /etc/rcS.d/S45open-iscsi Adding system startup for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc0.d/S45open-iscsi -> ../init.d/open-iscsi * The problem is the "/etc/rcS.d/S45open-iscsi" symlink is incorrectly changed to "/etc/rc0.d/S45open-iscsi". * Instead, the correct behaviour is to keep the symlink in /etc/rcS.d/ intact: root@trusty-openiscsi:/etc# update-rc.d open-iscsi enable update-rc.d: warning: start runlevel arguments (none) do not match open-iscsi Default-Start values (S) update-rc.d: warning: stop runlevel arguments (none) do not match open-iscsi Default-Stop values (0 1 6) Enabling system startup links for /etc/init.d/open-iscsi ... Removing any system startup links for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi /etc/rc1.d/K81open-iscsi /etc/rc6.d/K81open-iscsi /etc/rcS.d/S45open-iscsi Adding system startup for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rcS.d/S45open-iscsi -> ../init.d/open-iscsi [Regression Potential] * There is only one file modified, which is the update-rc.d perl script. Worst case scenario is that users cannot enable or disable their services, or a symlink is changed such that a service is started / stopped on an incorrect runlevel. * If a regression happens, any damage should be easily spotted by a sysadmin and can be manually repaired by making manual symlinks with "ln -s". * I have built and tested the change in a PPA, which you can find here: https://launchpad.net/~mruffell/+archive/ubuntu/sysvinit-testing * My only cause for concern is that if a regression does happen, it may impact packages that run "update-rc.d [en|dis]able" in a postinstall module, although I haven't managed to find an example that does this, since most use
[Touch-packages] [Bug 1827172] Re: update-rc.d: enabling or disabling S runlevel services incorrectly modifies runlevel
** Tags removed: sts-sponsor sts-sponsor-ddstreet -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to sysvinit in Ubuntu. https://bugs.launchpad.net/bugs/1827172 Title: update-rc.d: enabling or disabling S runlevel services incorrectly modifies runlevel Status in sysvinit package in Ubuntu: New Status in sysvinit source package in Trusty: In Progress Bug description: [Impact] * update-rc.d, in sysv-rc-2.88dsf-41ubuntu6.3 is broken in trusty. * update-rc.d incorrectly modifies symlinks when enabling or disabling services which are started on the "S" runlevel. * This can lead to services being changed from S runlevel from where they would be started on boot, to "0" runlevel, and are run on halt, which is incorrect. * The bug is caused by trying to use the runlevel to index into an integer array of runlevels. When the runlevel in question is "S", an error is printed Argument "S" isn't numeric in array element at /usr/sbin/update-rc.d line 232. Perl then sets the index to default to 0, which changes the runlevel. * The fix is to check if the runlevel is "S", and if it is, set the index to 99 which conforms with other expected usages for the "S" runlevel in the script. See the "startstop" and "makelinks" subroutines. [Test Case] * You can reproduce this with any service that is started on the "S" runlevel. We will use open-iscsi for an example. 1) Install open-iscsi $ sudo apt install open-iscsi 2) Check to see symlinks for init.d scripts are set to defaults: root@trusty-openiscsi:/etc# ls -l /etc/rc[0123456S].d/*iscsi* /etc/rc0.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rcS.d/S45open-iscsi -> ../init.d/open-iscsi 3) Use update-rc.d to enable open-iscsi service root@trusty-openiscsi:/etc# update-rc.d open-iscsi enable update-rc.d: warning: start runlevel arguments (none) do not match open-iscsi Default-Start values (S) update-rc.d: warning: stop runlevel arguments (none) do not match open-iscsi Default-Stop values (0 1 6) Argument "S" isn't numeric in array element at /usr/sbin/update-rc.d line 232. Enabling system startup links for /etc/init.d/open-iscsi ... Removing any system startup links for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi /etc/rc1.d/K81open-iscsi /etc/rc6.d/K81open-iscsi /etc/rcS.d/S45open-iscsi Adding system startup for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc0.d/S45open-iscsi -> ../init.d/open-iscsi * The problem is the "/etc/rcS.d/S45open-iscsi" symlink is incorrectly changed to "/etc/rc0.d/S45open-iscsi". * Instead, the correct behaviour is to keep the symlink in /etc/rcS.d/ intact: root@trusty-openiscsi:/etc# update-rc.d open-iscsi enable update-rc.d: warning: start runlevel arguments (none) do not match open-iscsi Default-Start values (S) update-rc.d: warning: stop runlevel arguments (none) do not match open-iscsi Default-Stop values (0 1 6) Enabling system startup links for /etc/init.d/open-iscsi ... Removing any system startup links for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi /etc/rc1.d/K81open-iscsi /etc/rc6.d/K81open-iscsi /etc/rcS.d/S45open-iscsi Adding system startup for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rcS.d/S45open-iscsi -> ../init.d/open-iscsi [Regression Potential] * There is only one file modified, which is the update-rc.d perl script. Worst case scenario is that users cannot enable or disable their services, or a symlink is changed such that a service is started / stopped on an incorrect runlevel. * If a regression happens, any damage should be easily spotted by a sysadmin and can be manually repaired by making manual symlinks with "ln -s". * I have built and tested the change in a PPA, which you can find here: https://launchpad.net/~mruffell/+archive/ubuntu/sysvinit-testing * My only cause for concern is that if a regression does happen, it may impact packages that run "update-rc.d [en|dis]able" in a postinstall module, although I haven't managed to find an example that does this, since most use the "defaults" command instead. [Other Info] * trusty is the last Ubuntu release to use sysvinit, and this bug is not present in newer versions since they use systemd,
[Touch-packages] [Bug 1827172] Re: update-rc.d: enabling or disabling S runlevel services incorrectly modifies runlevel
Attached is the final debdiff for release, mostly for having a record of it. I have built it in a personal ppa, tested it and verified it works. ** Patch added: "sysvinit debdiff for trusty esm" https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/1827172/+attachment/5269216/+files/lp1827172_trusty_esm.debdiff -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to sysvinit in Ubuntu. https://bugs.launchpad.net/bugs/1827172 Title: update-rc.d: enabling or disabling S runlevel services incorrectly modifies runlevel Status in sysvinit package in Ubuntu: New Status in sysvinit source package in Trusty: In Progress Bug description: [Impact] * update-rc.d, in sysv-rc-2.88dsf-41ubuntu6.3 is broken in trusty. * update-rc.d incorrectly modifies symlinks when enabling or disabling services which are started on the "S" runlevel. * This can lead to services being changed from S runlevel from where they would be started on boot, to "0" runlevel, and are run on halt, which is incorrect. * The bug is caused by trying to use the runlevel to index into an integer array of runlevels. When the runlevel in question is "S", an error is printed Argument "S" isn't numeric in array element at /usr/sbin/update-rc.d line 232. Perl then sets the index to default to 0, which changes the runlevel. * The fix is to check if the runlevel is "S", and if it is, set the index to 99 which conforms with other expected usages for the "S" runlevel in the script. See the "startstop" and "makelinks" subroutines. [Test Case] * You can reproduce this with any service that is started on the "S" runlevel. We will use open-iscsi for an example. 1) Install open-iscsi $ sudo apt install open-iscsi 2) Check to see symlinks for init.d scripts are set to defaults: root@trusty-openiscsi:/etc# ls -l /etc/rc[0123456S].d/*iscsi* /etc/rc0.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rcS.d/S45open-iscsi -> ../init.d/open-iscsi 3) Use update-rc.d to enable open-iscsi service root@trusty-openiscsi:/etc# update-rc.d open-iscsi enable update-rc.d: warning: start runlevel arguments (none) do not match open-iscsi Default-Start values (S) update-rc.d: warning: stop runlevel arguments (none) do not match open-iscsi Default-Stop values (0 1 6) Argument "S" isn't numeric in array element at /usr/sbin/update-rc.d line 232. Enabling system startup links for /etc/init.d/open-iscsi ... Removing any system startup links for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi /etc/rc1.d/K81open-iscsi /etc/rc6.d/K81open-iscsi /etc/rcS.d/S45open-iscsi Adding system startup for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc0.d/S45open-iscsi -> ../init.d/open-iscsi * The problem is the "/etc/rcS.d/S45open-iscsi" symlink is incorrectly changed to "/etc/rc0.d/S45open-iscsi". * Instead, the correct behaviour is to keep the symlink in /etc/rcS.d/ intact: root@trusty-openiscsi:/etc# update-rc.d open-iscsi enable update-rc.d: warning: start runlevel arguments (none) do not match open-iscsi Default-Start values (S) update-rc.d: warning: stop runlevel arguments (none) do not match open-iscsi Default-Stop values (0 1 6) Enabling system startup links for /etc/init.d/open-iscsi ... Removing any system startup links for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi /etc/rc1.d/K81open-iscsi /etc/rc6.d/K81open-iscsi /etc/rcS.d/S45open-iscsi Adding system startup for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rcS.d/S45open-iscsi -> ../init.d/open-iscsi [Regression Potential] * There is only one file modified, which is the update-rc.d perl script. Worst case scenario is that users cannot enable or disable their services, or a symlink is changed such that a service is started / stopped on an incorrect runlevel. * If a regression happens, any damage should be easily spotted by a sysadmin and can be manually repaired by making manual symlinks with "ln -s". * I have built and tested the change in a PPA, which you can find here: https://launchpad.net/~mruffell/+archive/ubuntu/sysvinit-testing * My only cause for concern is that if a regression does happen, it may impact packages that run "update-rc.d [en|dis]able" in a postinstall
[Touch-packages] [Bug 1827172] Re: update-rc.d: enabling or disabling S runlevel services incorrectly modifies runlevel
** Tags added: sts-sponsor-ddstreet -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to sysvinit in Ubuntu. https://bugs.launchpad.net/bugs/1827172 Title: update-rc.d: enabling or disabling S runlevel services incorrectly modifies runlevel Status in sysvinit package in Ubuntu: New Status in sysvinit source package in Trusty: In Progress Bug description: [Impact] * update-rc.d, in sysv-rc-2.88dsf-41ubuntu6.3 is broken in trusty. * update-rc.d incorrectly modifies symlinks when enabling or disabling services which are started on the "S" runlevel. * This can lead to services being changed from S runlevel from where they would be started on boot, to "0" runlevel, and are run on halt, which is incorrect. * The bug is caused by trying to use the runlevel to index into an integer array of runlevels. When the runlevel in question is "S", an error is printed Argument "S" isn't numeric in array element at /usr/sbin/update-rc.d line 232. Perl then sets the index to default to 0, which changes the runlevel. * The fix is to check if the runlevel is "S", and if it is, set the index to 99 which conforms with other expected usages for the "S" runlevel in the script. See the "startstop" and "makelinks" subroutines. [Test Case] * You can reproduce this with any service that is started on the "S" runlevel. We will use open-iscsi for an example. 1) Install open-iscsi $ sudo apt install open-iscsi 2) Check to see symlinks for init.d scripts are set to defaults: root@trusty-openiscsi:/etc# ls -l /etc/rc[0123456S].d/*iscsi* /etc/rc0.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rcS.d/S45open-iscsi -> ../init.d/open-iscsi 3) Use update-rc.d to enable open-iscsi service root@trusty-openiscsi:/etc# update-rc.d open-iscsi enable update-rc.d: warning: start runlevel arguments (none) do not match open-iscsi Default-Start values (S) update-rc.d: warning: stop runlevel arguments (none) do not match open-iscsi Default-Stop values (0 1 6) Argument "S" isn't numeric in array element at /usr/sbin/update-rc.d line 232. Enabling system startup links for /etc/init.d/open-iscsi ... Removing any system startup links for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi /etc/rc1.d/K81open-iscsi /etc/rc6.d/K81open-iscsi /etc/rcS.d/S45open-iscsi Adding system startup for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc0.d/S45open-iscsi -> ../init.d/open-iscsi * The problem is the "/etc/rcS.d/S45open-iscsi" symlink is incorrectly changed to "/etc/rc0.d/S45open-iscsi". * Instead, the correct behaviour is to keep the symlink in /etc/rcS.d/ intact: root@trusty-openiscsi:/etc# update-rc.d open-iscsi enable update-rc.d: warning: start runlevel arguments (none) do not match open-iscsi Default-Start values (S) update-rc.d: warning: stop runlevel arguments (none) do not match open-iscsi Default-Stop values (0 1 6) Enabling system startup links for /etc/init.d/open-iscsi ... Removing any system startup links for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi /etc/rc1.d/K81open-iscsi /etc/rc6.d/K81open-iscsi /etc/rcS.d/S45open-iscsi Adding system startup for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rcS.d/S45open-iscsi -> ../init.d/open-iscsi [Regression Potential] * There is only one file modified, which is the update-rc.d perl script. Worst case scenario is that users cannot enable or disable their services, or a symlink is changed such that a service is started / stopped on an incorrect runlevel. * If a regression happens, any damage should be easily spotted by a sysadmin and can be manually repaired by making manual symlinks with "ln -s". * I have built and tested the change in a PPA, which you can find here: https://launchpad.net/~mruffell/+archive/ubuntu/sysvinit-testing * My only cause for concern is that if a regression does happen, it may impact packages that run "update-rc.d [en|dis]able" in a postinstall module, although I haven't managed to find an example that does this, since most use the "defaults" command instead. [Other Info] * trusty is the last Ubuntu release to use sysvinit, and this bug is not present in newer versions since they use systemd, and the code in
[Touch-packages] [Bug 1827172] Re: update-rc.d: enabling or disabling S runlevel services incorrectly modifies runlevel
** Tags added: sts-sponsor -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to sysvinit in Ubuntu. https://bugs.launchpad.net/bugs/1827172 Title: update-rc.d: enabling or disabling S runlevel services incorrectly modifies runlevel Status in sysvinit package in Ubuntu: New Status in sysvinit source package in Trusty: In Progress Bug description: [Impact] * update-rc.d, in sysv-rc-2.88dsf-41ubuntu6.3 is broken in trusty. * update-rc.d incorrectly modifies symlinks when enabling or disabling services which are started on the "S" runlevel. * This can lead to services being changed from S runlevel from where they would be started on boot, to "0" runlevel, and are run on halt, which is incorrect. * The bug is caused by trying to use the runlevel to index into an integer array of runlevels. When the runlevel in question is "S", an error is printed Argument "S" isn't numeric in array element at /usr/sbin/update-rc.d line 232. Perl then sets the index to default to 0, which changes the runlevel. * The fix is to check if the runlevel is "S", and if it is, set the index to 99 which conforms with other expected usages for the "S" runlevel in the script. See the "startstop" and "makelinks" subroutines. [Test Case] * You can reproduce this with any service that is started on the "S" runlevel. We will use open-iscsi for an example. 1) Install open-iscsi $ sudo apt install open-iscsi 2) Check to see symlinks for init.d scripts are set to defaults: root@trusty-openiscsi:/etc# ls -l /etc/rc[0123456S].d/*iscsi* /etc/rc0.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rcS.d/S45open-iscsi -> ../init.d/open-iscsi 3) Use update-rc.d to enable open-iscsi service root@trusty-openiscsi:/etc# update-rc.d open-iscsi enable update-rc.d: warning: start runlevel arguments (none) do not match open-iscsi Default-Start values (S) update-rc.d: warning: stop runlevel arguments (none) do not match open-iscsi Default-Stop values (0 1 6) Argument "S" isn't numeric in array element at /usr/sbin/update-rc.d line 232. Enabling system startup links for /etc/init.d/open-iscsi ... Removing any system startup links for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi /etc/rc1.d/K81open-iscsi /etc/rc6.d/K81open-iscsi /etc/rcS.d/S45open-iscsi Adding system startup for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc0.d/S45open-iscsi -> ../init.d/open-iscsi * The problem is the "/etc/rcS.d/S45open-iscsi" symlink is incorrectly changed to "/etc/rc0.d/S45open-iscsi". * Instead, the correct behaviour is to keep the symlink in /etc/rcS.d/ intact: root@trusty-openiscsi:/etc# update-rc.d open-iscsi enable update-rc.d: warning: start runlevel arguments (none) do not match open-iscsi Default-Start values (S) update-rc.d: warning: stop runlevel arguments (none) do not match open-iscsi Default-Stop values (0 1 6) Enabling system startup links for /etc/init.d/open-iscsi ... Removing any system startup links for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi /etc/rc1.d/K81open-iscsi /etc/rc6.d/K81open-iscsi /etc/rcS.d/S45open-iscsi Adding system startup for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rcS.d/S45open-iscsi -> ../init.d/open-iscsi [Regression Potential] * There is only one file modified, which is the update-rc.d perl script. Worst case scenario is that users cannot enable or disable their services, or a symlink is changed such that a service is started / stopped on an incorrect runlevel. * If a regression happens, any damage should be easily spotted by a sysadmin and can be manually repaired by making manual symlinks with "ln -s". * I have built and tested the change in a PPA, which you can find here: https://launchpad.net/~mruffell/+archive/ubuntu/sysvinit-testing * My only cause for concern is that if a regression does happen, it may impact packages that run "update-rc.d [en|dis]able" in a postinstall module, although I haven't managed to find an example that does this, since most use the "defaults" command instead. [Other Info] * trusty is the last Ubuntu release to use sysvinit, and this bug is not present in newer versions since they use systemd, and the code in question
[Touch-packages] [Bug 1827172] Re: update-rc.d: enabling or disabling S runlevel services incorrectly modifies runlevel
The attachment "sysvinit debdiff for trusty" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team. [This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.] ** Tags added: patch -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to sysvinit in Ubuntu. https://bugs.launchpad.net/bugs/1827172 Title: update-rc.d: enabling or disabling S runlevel services incorrectly modifies runlevel Status in sysvinit package in Ubuntu: New Status in sysvinit source package in Trusty: In Progress Bug description: [Impact] * update-rc.d, in sysv-rc-2.88dsf-41ubuntu6.3 is broken in trusty. * update-rc.d incorrectly modifies symlinks when enabling or disabling services which are started on the "S" runlevel. * This can lead to services being changed from S runlevel from where they would be started on boot, to "0" runlevel, and are run on halt, which is incorrect. * The bug is caused by trying to use the runlevel to index into an integer array of runlevels. When the runlevel in question is "S", an error is printed Argument "S" isn't numeric in array element at /usr/sbin/update-rc.d line 232. Perl then sets the index to default to 0, which changes the runlevel. * The fix is to check if the runlevel is "S", and if it is, set the index to 99 which conforms with other expected usages for the "S" runlevel in the script. See the "startstop" and "makelinks" subroutines. [Test Case] * You can reproduce this with any service that is started on the "S" runlevel. We will use open-iscsi for an example. 1) Install open-iscsi $ sudo apt install open-iscsi 2) Check to see symlinks for init.d scripts are set to defaults: root@trusty-openiscsi:/etc# ls -l /etc/rc[0123456S].d/*iscsi* /etc/rc0.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rcS.d/S45open-iscsi -> ../init.d/open-iscsi 3) Use update-rc.d to enable open-iscsi service root@trusty-openiscsi:/etc# update-rc.d open-iscsi enable update-rc.d: warning: start runlevel arguments (none) do not match open-iscsi Default-Start values (S) update-rc.d: warning: stop runlevel arguments (none) do not match open-iscsi Default-Stop values (0 1 6) Argument "S" isn't numeric in array element at /usr/sbin/update-rc.d line 232. Enabling system startup links for /etc/init.d/open-iscsi ... Removing any system startup links for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi /etc/rc1.d/K81open-iscsi /etc/rc6.d/K81open-iscsi /etc/rcS.d/S45open-iscsi Adding system startup for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc0.d/S45open-iscsi -> ../init.d/open-iscsi * The problem is the "/etc/rcS.d/S45open-iscsi" symlink is incorrectly changed to "/etc/rc0.d/S45open-iscsi". * Instead, the correct behaviour is to keep the symlink in /etc/rcS.d/ intact: root@trusty-openiscsi:/etc# update-rc.d open-iscsi enable update-rc.d: warning: start runlevel arguments (none) do not match open-iscsi Default-Start values (S) update-rc.d: warning: stop runlevel arguments (none) do not match open-iscsi Default-Stop values (0 1 6) Enabling system startup links for /etc/init.d/open-iscsi ... Removing any system startup links for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi /etc/rc1.d/K81open-iscsi /etc/rc6.d/K81open-iscsi /etc/rcS.d/S45open-iscsi Adding system startup for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rcS.d/S45open-iscsi -> ../init.d/open-iscsi [Regression Potential] * There is only one file modified, which is the update-rc.d perl script. Worst case scenario is that users cannot enable or disable their services, or a symlink is changed such that a service is started / stopped on an incorrect runlevel. * If a regression happens, any damage should be easily spotted by a sysadmin and can be manually repaired by making manual symlinks with "ln -s". * I have built and tested the change in a PPA, which you can find here:
[Touch-packages] [Bug 1827172] Re: update-rc.d: enabling or disabling S runlevel services incorrectly modifies runlevel
This debdiff contains the patch for trusty. I have tested it, built it in a ppa and run autopkgtest, and things look fine to me. ** Patch added: "sysvinit debdiff for trusty" https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/1827172/+attachment/5260712/+files/lp1827172_trusty.debdiff -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to sysvinit in Ubuntu. https://bugs.launchpad.net/bugs/1827172 Title: update-rc.d: enabling or disabling S runlevel services incorrectly modifies runlevel Status in sysvinit package in Ubuntu: New Status in sysvinit source package in Trusty: In Progress Bug description: [Impact] * update-rc.d, in sysv-rc-2.88dsf-41ubuntu6.3 is broken in trusty. * update-rc.d incorrectly modifies symlinks when enabling or disabling services which are started on the "S" runlevel. * This can lead to services being changed from S runlevel from where they would be started on boot, to "0" runlevel, and are run on halt, which is incorrect. * The bug is caused by trying to use the runlevel to index into an integer array of runlevels. When the runlevel in question is "S", an error is printed Argument "S" isn't numeric in array element at /usr/sbin/update-rc.d line 232. Perl then sets the index to default to 0, which changes the runlevel. * The fix is to check if the runlevel is "S", and if it is, set the index to 99 which conforms with other expected usages for the "S" runlevel in the script. See the "startstop" and "makelinks" subroutines. [Test Case] * You can reproduce this with any service that is started on the "S" runlevel. We will use open-iscsi for an example. 1) Install open-iscsi $ sudo apt install open-iscsi 2) Check to see symlinks for init.d scripts are set to defaults: root@trusty-openiscsi:/etc# ls -l /etc/rc[0123456S].d/*iscsi* /etc/rc0.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rcS.d/S45open-iscsi -> ../init.d/open-iscsi 3) Use update-rc.d to enable open-iscsi service root@trusty-openiscsi:/etc# update-rc.d open-iscsi enable update-rc.d: warning: start runlevel arguments (none) do not match open-iscsi Default-Start values (S) update-rc.d: warning: stop runlevel arguments (none) do not match open-iscsi Default-Stop values (0 1 6) Argument "S" isn't numeric in array element at /usr/sbin/update-rc.d line 232. Enabling system startup links for /etc/init.d/open-iscsi ... Removing any system startup links for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi /etc/rc1.d/K81open-iscsi /etc/rc6.d/K81open-iscsi /etc/rcS.d/S45open-iscsi Adding system startup for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc0.d/S45open-iscsi -> ../init.d/open-iscsi * The problem is the "/etc/rcS.d/S45open-iscsi" symlink is incorrectly changed to "/etc/rc0.d/S45open-iscsi". * Instead, the correct behaviour is to keep the symlink in /etc/rcS.d/ intact: root@trusty-openiscsi:/etc# update-rc.d open-iscsi enable update-rc.d: warning: start runlevel arguments (none) do not match open-iscsi Default-Start values (S) update-rc.d: warning: stop runlevel arguments (none) do not match open-iscsi Default-Stop values (0 1 6) Enabling system startup links for /etc/init.d/open-iscsi ... Removing any system startup links for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi /etc/rc1.d/K81open-iscsi /etc/rc6.d/K81open-iscsi /etc/rcS.d/S45open-iscsi Adding system startup for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rcS.d/S45open-iscsi -> ../init.d/open-iscsi [Regression Potential] * There is only one file modified, which is the update-rc.d perl script. Worst case scenario is that users cannot enable or disable their services, or a symlink is changed such that a service is started / stopped on an incorrect runlevel. * If a regression happens, any damage should be easily spotted by a sysadmin and can be manually repaired by making manual symlinks with "ln -s". * I have built and tested the change in a PPA, which you can find here: https://launchpad.net/~mruffell/+archive/ubuntu/sysvinit-testing * My only cause for concern is that if a regression does happen, it may impact packages that run "update-rc.d [en|dis]able" in a postinstall module, although I
[Touch-packages] [Bug 1827172] Re: update-rc.d: enabling or disabling S runlevel services incorrectly modifies runlevel
I have developed a patch which I believe fixes the problem. https://paste.ubuntu.com/p/QRw4XTkXkV/ ** Description changed: [Impact] * update-rc.d, in sysv-rc-2.88dsf-41ubuntu6.3 is broken in trusty. - * update-rc.d incorrectly modifies symlinks when enabling or disabling -services which are started on the "S" runlevel. + * update-rc.d incorrectly modifies symlinks when enabling or disabling + services which are started on the "S" runlevel. - * This can lead to services being changed from S runlevel from where they -would be started on boot, to "0" runlevel, and are run on halt, which is -incorrect. + * This can lead to services being changed from S runlevel from where they + would be started on boot, to "0" runlevel, and are run on halt, which is + incorrect. * The bug is caused by trying to use the runlevel to index into an integer - array of runlevels. When the runlevel in question is "S", an error is -printed + array of runlevels. When the runlevel in question is "S", an error is + printed -Argument "S" isn't numeric in array element at /usr/sbin/update-rc.d line -232. + Argument "S" isn't numeric in array element at /usr/sbin/update-rc.d line + 232. Perl then sets the index to default to 0, which changes the runlevel. - * The fix is to check if the runlevel is "S", and if it is, set the index to -99 which conforms with other expected usages for the "S" runlevel in the -script. See the "startstop" and "makelinks" subroutines. + * The fix is to check if the runlevel is "S", and if it is, set the index to + 99 which conforms with other expected usages for the "S" runlevel in the + script. See the "startstop" and "makelinks" subroutines. [Test Case] - * You can reproduce this with any service that is started on the "S" - runlevel. We will use open-iscsi for an example. + * You can reproduce this with any service that is started on the "S" + runlevel. We will use open-iscsi for an example. 1) Install open-iscsi $ sudo apt install open-iscsi 2) Check to see symlinks for init.d scripts are set to defaults: root@trusty-openiscsi:/etc# ls -l /etc/rc[0123456S].d/*iscsi* /etc/rc0.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rcS.d/S45open-iscsi -> ../init.d/open-iscsi 3) Use update-rc.d to enable open-iscsi service root@trusty-openiscsi:/etc# update-rc.d open-iscsi enable update-rc.d: warning: start runlevel arguments (none) do not match open-iscsi Default-Start values (S) update-rc.d: warning: stop runlevel arguments (none) do not match open-iscsi Default-Stop values (0 1 6) Argument "S" isn't numeric in array element at /usr/sbin/update-rc.d line 232. Enabling system startup links for /etc/init.d/open-iscsi ... Removing any system startup links for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi /etc/rc1.d/K81open-iscsi /etc/rc6.d/K81open-iscsi /etc/rcS.d/S45open-iscsi Adding system startup for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc0.d/S45open-iscsi -> ../init.d/open-iscsi - * The problem is the "/etc/rcS.d/S45open-iscsi" symlink is incorrectly - changed to "/etc/rc0.d/S45open-iscsi". + * The problem is the "/etc/rcS.d/S45open-iscsi" symlink is incorrectly + changed to "/etc/rc0.d/S45open-iscsi". - * Instead, the correct behaviour is to keep the symlink in /etc/rcS.d/ - intact: + * Instead, the correct behaviour is to keep the symlink in /etc/rcS.d/ + intact: root@trusty-openiscsi:/etc# update-rc.d open-iscsi enable update-rc.d: warning: start runlevel arguments (none) do not match open-iscsi Default-Start values (S) update-rc.d: warning: stop runlevel arguments (none) do not match open-iscsi Default-Stop values (0 1 6) Enabling system startup links for /etc/init.d/open-iscsi ... Removing any system startup links for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi /etc/rc1.d/K81open-iscsi /etc/rc6.d/K81open-iscsi /etc/rcS.d/S45open-iscsi Adding system startup for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rcS.d/S45open-iscsi -> ../init.d/open-iscsi [Regression Potential] - * There is only one file modified, which is the update-rc.d perl script. -Worst case scenario is that users cannot enable or disable their services, -or a symlink is changed such that a service is started / stopped on an -
[Touch-packages] [Bug 1827172] Re: update-rc.d: enabling or disabling S runlevel services incorrectly modifies runlevel
** Description changed: [Impact] - * update-rc.d, in sysv-rc-2.88dsf-41ubuntu6.3 is broken in trusty. + * update-rc.d, in sysv-rc-2.88dsf-41ubuntu6.3 is broken in trusty. - * update-rc.d incorrectly modifies symlinks when enabling or disabling services -which are started on the "S" runlevel. + * update-rc.d incorrectly modifies symlinks when enabling or disabling +services which are started on the "S" runlevel. - * This can lead to services being changed from S runlevel from where they would -be started on boot, to "0" runlevel, and are run on halt, which is incorrect. + * This can lead to services being changed from S runlevel from where they +would be started on boot, to "0" runlevel, and are run on halt, which is +incorrect. - * The bug is caused by trying to use the runlevel to index into an integer -array of runlevels. When the runlevel in question is "S", an error is printed - -Argument "S" isn't numeric in array element at /usr/sbin/update-rc.d line 232. + * The bug is caused by trying to use the runlevel to index into an integer + array of runlevels. When the runlevel in question is "S", an error is +printed -Perl then sets the index to default to 0, which changes the runlevel. +Argument "S" isn't numeric in array element at /usr/sbin/update-rc.d line +232. - * The fix is to check if the runlevel is "S", and if it is, set the index to 99 -which conforms with other expected usages for the "S" runlevel in the script. -See the "startstop" and "makelinks" subroutines. + Perl then sets the index to default to 0, which changes the runlevel. + + * The fix is to check if the runlevel is "S", and if it is, set the index to +99 which conforms with other expected usages for the "S" runlevel in the +script. See the "startstop" and "makelinks" subroutines. [Test Case] - * You can reproduce this with any service that is started on the "S" runlevel. - We will use open-iscsi for an example. + * You can reproduce this with any service that is started on the "S" + runlevel. We will use open-iscsi for an example. 1) Install open-iscsi $ sudo apt install open-iscsi 2) Check to see symlinks for init.d scripts are set to defaults: root@trusty-openiscsi:/etc# ls -l /etc/rc[0123456S].d/*iscsi* - lrwxrwxrwx 1 root root 24 Apr 29 20:56 /etc/rc0.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh - lrwxrwxrwx 1 root root 20 Apr 29 20:56 /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi - lrwxrwxrwx 1 root root 24 Apr 29 20:56 /etc/rc1.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh - lrwxrwxrwx 1 root root 20 Apr 29 20:56 /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi - lrwxrwxrwx 1 root root 24 Apr 29 20:56 /etc/rc6.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh - lrwxrwxrwx 1 root root 20 Apr 29 20:56 /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi - lrwxrwxrwx 1 root root 20 Apr 29 20:56 /etc/rcS.d/S45open-iscsi -> ../init.d/open-iscsi + /etc/rc0.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh + /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi + /etc/rc1.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh + /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi + /etc/rc6.d/K80umountiscsi.sh -> ../init.d/umountiscsi.sh + /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi + /etc/rcS.d/S45open-iscsi -> ../init.d/open-iscsi 3) Use update-rc.d to enable open-iscsi service root@trusty-openiscsi:/etc# update-rc.d open-iscsi enable update-rc.d: warning: start runlevel arguments (none) do not match open-iscsi Default-Start values (S) update-rc.d: warning: stop runlevel arguments (none) do not match open-iscsi Default-Stop values (0 1 6) Argument "S" isn't numeric in array element at /usr/sbin/update-rc.d line 232. Enabling system startup links for /etc/init.d/open-iscsi ... Removing any system startup links for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi /etc/rc1.d/K81open-iscsi /etc/rc6.d/K81open-iscsi /etc/rcS.d/S45open-iscsi Adding system startup for /etc/init.d/open-iscsi ... /etc/rc0.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc1.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc6.d/K81open-iscsi -> ../init.d/open-iscsi /etc/rc0.d/S45open-iscsi -> ../init.d/open-iscsi - * The problem is the "/etc/rcS.d/S45open-iscsi" symlink is incorrectly changed to - "/etc/rc0.d/S45open-iscsi". + * The problem is the "/etc/rcS.d/S45open-iscsi" symlink is incorrectly + changed to "/etc/rc0.d/S45open-iscsi". - * Instead, the correct behaviour is to keep the symlink in /etc/rcS.d/ - intact: + * Instead, the correct behaviour is to keep the symlink in /etc/rcS.d/ + intact: root@trusty-openiscsi:/etc# update-rc.d open-iscsi enable update-rc.d: warning: start runlevel arguments (none) do not match open-iscsi Default-Start values (S) update-rc.d: warning: stop runlevel arguments (none) do not match open-iscsi Default-Stop values