From: Stefan Schantl Date: Tue, 1 Nov 2011 11:58:23 +0000 (+0100) Subject: initscript: Cleanup package. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=579d794a2f846a5ef4ce98cada64f553df365f5c;p=ipfire-3.x.git initscript: Cleanup package. * Removed obsolate functions file. * Removed deprecated /etc/sysconfig files. --- diff --git a/initscripts/functions b/initscripts/functions deleted file mode 100644 index c5451ff70..000000000 --- a/initscripts/functions +++ /dev/null @@ -1,284 +0,0 @@ -#!/bin/sh -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see . # -# # -############################################################################### -# -# Partly based on scripts by DJ Lucas - dj@linuxfromscratch.org -# - -# Distro Information -DISTRO="$( -# if type is equal to "dev" -# -# -# is the name of the file which is to be created -# is either file, dir, or dev. -# file creates a new file -# dir creates a new directory -# dev creates a new device -# is either block, char or pipe -# block creates a block device -# char creates a character deivce -# pipe creates a pipe, this will ignore the and fields -# and are the major and minor numbers used for the device. -######################################################################## - -# End /etc/sysconfig/createfiles diff --git a/initscripts/sysconfig/modules b/initscripts/sysconfig/modules deleted file mode 100644 index d6fc14c72..000000000 --- a/initscripts/sysconfig/modules +++ /dev/null @@ -1,21 +0,0 @@ -######################################################################## -# Begin /etc/sysconfig/modules -# -# Description : Module auto-loading configuration -# -# Authors : -# -# Version : 00.00 -# -# Notes : The syntax of this file is as follows: -# [ ...] -# -# Each module should be on it's own line, and any options that you want -# passed to the module should follow it. The line deliminator is either -# a space or a tab. -######################################################################## - -# For dialin with pppd -ppp_generic - -# End /etc/sysconfig/modules diff --git a/initscripts/sysconfig/network b/initscripts/sysconfig/network deleted file mode 100644 index 45e537e7f..000000000 --- a/initscripts/sysconfig/network +++ /dev/null @@ -1 +0,0 @@ -HOSTNAME=ipfire.localdomain diff --git a/initscripts/sysconfig/rc b/initscripts/sysconfig/rc deleted file mode 100644 index ffb70d98c..000000000 --- a/initscripts/sysconfig/rc +++ /dev/null @@ -1,52 +0,0 @@ -# Begin /etc/sysconfig/rc - -# Author: DJ Lucas - dj@linuxfromscratch.org -# Version: 1.0 LSB V.3.1 - -# Global variable inherited by initscripts are in caps -# Local variables for the rc script are in lowercase - -# Source site specific rc configuration -. /etc/sysconfig/rc.site - -# This sets default terminal options. -# stty sane - this has been removed as nobody recalls -# the reason for it in the first place - if no problems arize, -# then it will be removed completely at a later date. - -# Setup default values for the environment -umask 022 -PATH="/bin:/sbin" - -# Find current screen size -if [ -z "${COLUMNS}" ]; then - COLUMNS=$(stty size) - COLUMNS=${COLUMNS##* } -fi - -# When using remote connections, such as a serial port, stty size returns 0 -if [ "${COLUMNS}" = "0" ]; then - COLUMNS=80 -fi - -## Measurements for positioning result messages -COL=$((${COLUMNS} - 8)) -WCOL=$((${COL} - 2)) - -# Set Cursur Position Commands, used via echo -e -SET_COL="\\033[${COL}G" # at the $COL char -SET_WCOL="\\033[${WCOL}G" # at the $WCOL char -CURS_UP="\\033[1A\\033[0G" # Up one line, at the 0'th char - -# Bootlogging and interactive startup require a valid tempfs mount -# if this mount is not present, disable them -if [ "${TEMPFS_MOUNT}" = "" -o ! -d "${TEMPFS_MOUNT}" ]; then - TEMPFS_MOUNT="" - iprompt="" - BOOTLOG_ENAB="" -fi - -# Export the environment variables so they are inherited by the scripts -export PATH SET_COL SET_WCOL CURS_UP TEMPFS_MOUNT BOOTLOG_ENAB RUNLEVEL - -# End /etc/sysconfig/rc diff --git a/initscripts/sysconfig/rc.local b/initscripts/sysconfig/rc.local deleted file mode 100644 index 90347d79a..000000000 --- a/initscripts/sysconfig/rc.local +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see . # -# # -############################################################################### -# Used for private calls after boot # -############################################################################### - -# power button shutdown -if grep -q '^button' /proc/modules ; then - head -1 /proc/acpi/event | grep -q 'button/power PWRF' && init 0 & -fi diff --git a/initscripts/sysconfig/rc.site b/initscripts/sysconfig/rc.site deleted file mode 100644 index 82b7cc7fc..000000000 --- a/initscripts/sysconfig/rc.site +++ /dev/null @@ -1,71 +0,0 @@ -# Set base directory information -RC_BASE="/etc" -RC_FUNCTIONS="${RC_BASE}/init.d/ipfire-functions" - -# Location of network device scripts and config files -NETWORK_SCRIPTS="/etc/init.d/networking" -NETWORK_DEVICES="/etc/sysconfig/network-devices" - -# Directory to store boot process accounting information -# Used for boot logging and interactive flag when rootfs -# is not writable -TEMPFS_MOUNT="${RC_BASE}/init.d/boottemp" - -# Bootlogging (requires a tempfs mount) -BOOTLOG_ENAB="yes" - -# Distro Information -DISTRO="$(cat /etc/system-release)" # The distro name -DISTRO_CONTACT="http://bugtracker.ipfire.org" # Bug report address -DISTRO_MINI="ipfire" # Short name used in filenames for distro config - -# Define custom colors used in messages printed to the screen -BRACKET="\\033[1;34m" # Blue -FAILURE="\\033[1;31m" # Red -INFO="\\033[1;36m" # Cyan -NORMAL="\\033[0;39m" # Grey -SUCCESS="\\033[1;32m" # Green -WARNING="\\033[1;33m" # Yellow - -# Prefix boot messages for easier reading on framebuffer consoles -PREFIX_SUCCESS=" ${SUCCESS}*${NORMAL} " -PREFIX_WARNING="${WARNING}**${NORMAL} " -PREFIX_FAILURE="${FAILURE}***${NORMAL}" - -# Export varialbles so that they are inherited by the initscripts -export RC_BASE RC_FUNCTIONS TEMPFS_MOUNT BOOTLOG_ENAB -export NETWORK_DEVICES NETWORK_SCRIPTS -export DISTRO DISTRO_CONTACT DISTRO_MINI -export BRACKET FAILURE INFO NORMAL SUCCESS WARNING -export PREFIX_SUCCESS PREFIX_WARNING PREFIX_FAILURE - -# Interactive startup -iprompt="yes" # Wether to display the interactive boot promp -itime="2" # The ammount of time (in seconds) to display the prompt -dlen="$(( 11 + ${#DISTRO} ))" # The total length of the distro welcome string -ilen="38" # The total length of the interactive message -welcome_message="Welcome to ${INFO}${DISTRO}${NORMAL}" -i_message="Press '${FAILURE}I${NORMAL}' to enter interactive startup" - -# Error message displayed when a script's exit value is not zero -print_error_msg() -{ - # ${link} and ${error_value} are defined by the rc script - echo -e "${FAILURE}FAILURE: You should not be reading this error message." - echo -e "" - echo -e -n "${FAILURE}It means that an unforseen error took place in" - echo -e -n "${INFO} ${link}" - echo -e "${FAILURE}," - echo -e "${FAILURE}which exited with a return value of ${error_value}." - echo -e "" - echo -e -n "${FAILURE}If you are able to track this error down to a bug" - echo -e "${FAILURE}in one of the files" - echo -e -n "provided by ${INFO}${DISTRO}${FAILURE}, " - echo -e -n "${FAILURE}please be so kind to inform us at " - echo -e "${INFO}${DISTRO_CONTACT}${FAILURE}.${NORMAL}" - echo -e "" - echo -e "${INFO}Press Enter to continue..." - echo -e "${NORMAL}" - read ENTER -} -