This was dropped a while ago
Signed-off-by: Jonatan Schlag jonatan.schlag@ipfire.org --- lfs/initscripts | 3 --- 1 file changed, 3 deletions(-)
diff --git a/lfs/initscripts b/lfs/initscripts index 19b79a474..e078632ab 100644 --- a/lfs/initscripts +++ b/lfs/initscripts @@ -98,7 +98,6 @@ $(TARGET) : ln -sf ../init.d/fcron /etc/rc.d/rc0.d/K08fcron ln -sf ../init.d/apache /etc/rc.d/rc0.d/K28apache ln -sf ../init.d/sshd /etc/rc.d/rc0.d/K30sshd - ln -sf ../init.d/client175 /etc/rc.d/rc0.d/K34client175 ln -sf ../init.d/setclock /etc/rc.d/rc0.d/K47setclock ln -sf ../init.d/cyrus-sasl /etc/rc.d/rc0.d/K49cyrus-sasl ln -sf ../init.d/vnstat /etc/rc.d/rc0.d/K51vnstat @@ -131,7 +130,6 @@ $(TARGET) : ln -sf ../init.d/sshd /etc/rc.d/rc3.d/S30sshd ln -sf ../init.d/apache /etc/rc.d/rc3.d/S32apache ln -sf ../init.d/fcron /etc/rc.d/rc3.d/S40fcron - ln -sf ../init.d/client175 /etc/rc.d/rc3.d/S66client175 ln -sf ../../sysconfig/rc.local /etc/rc.d/rc3.d/S98rc.local ln -sf ../init.d/sslh /etc/rc.d/rc3.d/S98sslh ln -sf ../init.d/imspetor /etc/rc.d/rc3.d/S99imspetor @@ -145,7 +143,6 @@ $(TARGET) : ln -sf ../init.d/fcron /etc/rc.d/rc6.d/K08fcron ln -sf ../init.d/apache /etc/rc.d/rc6.d/K28apache ln -sf ../init.d/sshd /etc/rc.d/rc6.d/K30sshd - ln -sf ../init.d/client175 /etc/rc.d/rc6.d/K34client175 ln -sf ../init.d/setclock /etc/rc.d/rc6.d/K47setclock ln -sf ../init.d/cyrus-sasl /etc/rc.d/rc6.d/K49cyrus-sasl ln -sf ../init.d/vnstat /etc/rc.d/rc6.d/K51vnstat
/bin/sh is a symlink to /bin/bash on ipfire systems. Using /bin/sh in the scripts as shebang hurts in two ways:
1. We use features which do not work with sh as shell. This is not really a problem but if we rely on features of a real bash we can state this clearly. 2. The syntay highlighting in vim does not work without a correct shebang. As I want and need correct syntax highlighting I propose to change the shebang.
Signed-off-by: Jonatan Schlag jonatan.schlag@ipfire.org --- src/initscripts/networking/any | 2 +- src/initscripts/networking/functions.network | 2 +- src/initscripts/networking/red | 2 +- src/initscripts/networking/red.up/99-pakfire-update | 2 +- src/initscripts/system/network | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/initscripts/networking/any b/src/initscripts/networking/any index 15197badb..dc4796e91 100644 --- a/src/initscripts/networking/any +++ b/src/initscripts/networking/any @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash ############################################################################### # # # IPFire.org - A linux based firewall # diff --git a/src/initscripts/networking/functions.network b/src/initscripts/networking/functions.network index 0e2e5009e..4c7ad51d4 100644 --- a/src/initscripts/networking/functions.network +++ b/src/initscripts/networking/functions.network @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash ############################################################################### # # # IPFire.org - A linux based firewall # diff --git a/src/initscripts/networking/red b/src/initscripts/networking/red index 75a17bd5a..9da3ea406 100644 --- a/src/initscripts/networking/red +++ b/src/initscripts/networking/red @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash ############################################################################### # # # IPFire.org - A linux based firewall # diff --git a/src/initscripts/networking/red.up/99-pakfire-update b/src/initscripts/networking/red.up/99-pakfire-update index 3cc79a107..56cee66aa 100644 --- a/src/initscripts/networking/red.up/99-pakfire-update +++ b/src/initscripts/networking/red.up/99-pakfire-update @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash
nice -n 10 /opt/pakfire/pakfire update >/dev/null 2>&1 &
diff --git a/src/initscripts/system/network b/src/initscripts/system/network index 9ef3fb0d8..16609175a 100644 --- a/src/initscripts/system/network +++ b/src/initscripts/system/network @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash ############################################################################### # # # IPFire.org - A linux based firewall #
A long time ago (2007) there were more config types possible then 1, 2, 3 and 4. As our installer currently only accepts config type out of the set 1, 2, 3 and 4 we do not need to check if our CONFIG_TYPE is in this set.
Signed-off-by: Jonatan Schlag jonatan.schlag@ipfire.org --- src/initscripts/system/network | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/initscripts/system/network b/src/initscripts/system/network index 16609175a..ecc007a47 100644 --- a/src/initscripts/system/network +++ b/src/initscripts/system/network @@ -63,11 +63,9 @@ case "${DO}" in
# RED if [ "$red" == "1" ]; then - if [ "$CONFIG_TYPE" = "1" -o "$CONFIG_TYPE" = "2" -o "$CONFIG_TYPE" = "3" -o "$CONFIG_TYPE" = "4" ]; then - # Remove possible leftover files - rm -f /var/ipfire/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf} - [ "$AUTOCONNECT" == "off" ] || /etc/rc.d/init.d/networking/red start - fi + # Remove possible leftover files + rm -f /var/ipfire/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf} + [ "$AUTOCONNECT" == "off" ] || /etc/rc.d/init.d/networking/red start fi
# Create IPsec interfaces
This setting is also old (2007) and cannot be set via the webinterface anymore. So why checking for something, which can only be true.
Signed-off-by: Jonatan Schlag jonatan.schlag@ipfire.org --- src/initscripts/system/network | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/initscripts/system/network b/src/initscripts/system/network index ecc007a47..b38c3836c 100644 --- a/src/initscripts/system/network +++ b/src/initscripts/system/network @@ -65,7 +65,7 @@ case "${DO}" in if [ "$red" == "1" ]; then # Remove possible leftover files rm -f /var/ipfire/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf} - [ "$AUTOCONNECT" == "off" ] || /etc/rc.d/init.d/networking/red start + /etc/rc.d/init.d/networking/red start fi
# Create IPsec interfaces
There is no sense in doing this only in /etc/init.d/network and not in /etc/init.d/networking/red
This files should be always deleted before a startup
Signed-off-by: Jonatan Schlag jonatan.schlag@ipfire.org --- src/initscripts/networking/red | 3 +++ src/initscripts/system/network | 6 +----- 2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/initscripts/networking/red b/src/initscripts/networking/red index 9da3ea406..beb665e5f 100644 --- a/src/initscripts/networking/red +++ b/src/initscripts/networking/red @@ -80,6 +80,9 @@ fi
case "${1}" in start) + # Remove possible leftover files + rm -f /var/ipfire/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf} + if [ "${DEVICE}" != "${GREEN_DEV}" ] && [ "${DEVICE}" != "" ]; then boot_mesg "Bringing up the ${DEVICE} interface..." boot_mesg_flush diff --git a/src/initscripts/system/network b/src/initscripts/system/network index b38c3836c..0dcce060f 100644 --- a/src/initscripts/system/network +++ b/src/initscripts/system/network @@ -62,11 +62,7 @@ case "${DO}" in /etc/rc.d/init.d/networking/orange start
# RED - if [ "$red" == "1" ]; then - # Remove possible leftover files - rm -f /var/ipfire/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf} - /etc/rc.d/init.d/networking/red start - fi + [ "$red" == "1" ] && /etc/rc.d/init.d/networking/red start
# Create IPsec interfaces /usr/local/bin/ipsec-interfaces