summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1e3aa3c)
Adjusted sbin/grml-autoconfig to write changes to this new file
Updated documentation
# Filename: /etc/grml/autoconfig
# Filename: /etc/grml/autoconfig
-# Purpose: configuration for grml-autoconfig
+# Purpose: global configuration for grml-autoconfig
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
################################################################################
################################################################################
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
################################################################################
################################################################################
+# Notice: Please do not edit this file! Use grml-autoconfig or
+# /etc/grml/autoconfig.local instead!
+################################################################################
+
+
+################################################################################
# Notice: you can configure grml-autoconfig via adjusting the following values.
# Set them to 'yes' to activate them and to 'no' to deactivate them.
# But please notice that some options might require an additional bootparam
# Notice: you can configure grml-autoconfig via adjusting the following values.
# Set them to 'yes' to activate them and to 'no' to deactivate them.
# But please notice that some options might require an additional bootparam
CONFIG_WELCOME='yes' # play welcome sound (audio)
CONFIG_WONDERSHAPER='yes' # start wondershaper with options provided via bootparam
CONFIG_XSTARTUP='yes' # start X window system via grml-x [only in live-mode]
CONFIG_WELCOME='yes' # play welcome sound (audio)
CONFIG_WONDERSHAPER='yes' # start wondershaper with options provided via bootparam
CONFIG_XSTARTUP='yes' # start X window system via grml-x [only in live-mode]
+
+
+# config for local configuration file
+
+CONFIG_AUTOCONFIG_LOCAL='/etc/grml/autoconfig.local'
+
+[ -e ${CONFIG_AUTOCONFIG_LOCAL} ] && . ${CONFIG_AUTOCONFIG_LOCAL}
+
## END OF FILE #################################################################
## END OF FILE #################################################################
--- /dev/null
+# Filename: /etc/grml/autoconfig.local
+# Purpose: local configuration for grml-autoconfig
+# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
+# Bug-Reports: see http://grml.org/bugs/
+# License: This file is licensed under the GPL v2.
+################################################################################
# Add here commands to install the package into debian/grml-autoconfig.
install -m 755 grml-autoconfig debian/grml-autoconfig/etc/init.d/grml-autoconfig
install -m 644 autoconfig debian/grml-autoconfig/etc/grml/autoconfig
# Add here commands to install the package into debian/grml-autoconfig.
install -m 755 grml-autoconfig debian/grml-autoconfig/etc/init.d/grml-autoconfig
install -m 644 autoconfig debian/grml-autoconfig/etc/grml/autoconfig
+ install -m 644 autoconfig.local debian/grml-autoconfig/etc/grml/autoconfig.local
install -m 755 autoconfig.functions debian/grml-autoconfig/etc/grml/autoconfig.functions
install -m 644 language-functions debian/grml-autoconfig/etc/grml/language-functions
install -m 755 sbin/grml-autoconfig debian/grml-autoconfig/usr/sbin/grml-autoconfig
install -m 755 autoconfig.functions debian/grml-autoconfig/etc/grml/autoconfig.functions
install -m 644 language-functions debian/grml-autoconfig/etc/grml/language-functions
install -m 755 sbin/grml-autoconfig debian/grml-autoconfig/usr/sbin/grml-autoconfig
-Configuration file for grml-autoconfig framework. You can either edit this
-configuration file manually of use the dialog interface
+Default configuration file for grml-autoconfig framework. You can override
+settings via /etc/grml/autoconfig.local or use the dialog interface
/usr/sbin/grml-autoconfig.
/usr/sbin/grml-autoconfig.
+ */etc/grml/autoconfig.local*::
+User specific configuration file for grml-autoconfig. You can edit it directly
+or use the dialog interface /usr/sbin/grml-autoconfig.
+
+
*/etc/grml/autoconfig.functions*::
Main functions of the grml-autoconfig. You do not need to configure or execute
*/etc/grml/autoconfig.functions*::
Main functions of the grml-autoconfig. You do not need to configure or execute
AUTOCONFIG=/etc/grml/autoconfig
[ -r $AUTOCONFIG ] || exit 1
AUTOCONFIG=/etc/grml/autoconfig
[ -r $AUTOCONFIG ] || exit 1
# helper functions
activate_value()
{
# helper functions
activate_value()
{
- sed -i "s/$1.*/$1'yes'/" $AUTOCONFIG
+ check_entry $1
+ sed -i "s/$1.*/$1'yes'/" ${CONFIG_AUTOCONFIG_LOCAL}
- sed -i "s/$1.*/$1'no'/" $AUTOCONFIG
+ check_entry $1
+ sed -i "s/$1.*/$1'no'/" ${CONFIG_AUTOCONFIG_LOCAL}
grep -q $* $TMPFILE && return 0 || return 1
}
grep -q $* $TMPFILE && return 0 || return 1
}
+check_entry()
+{
+ if ! grep -q ${1} ${CONFIG_AUTOCONFIG_LOCAL} 2>/dev/null ; then
+ grep $1 ${AUTOCONFIG} >> ${CONFIG_AUTOCONFIG_LOCAL}
+ fi
+}
+
+is_set()
+{
+ [ $1 = 'yes' ] && return 0 || return 1
+}
- grep -q '^CONFIG_DHCP=.*yes' $AUTOCONFIG && DHCPSTATUS=ON || DHCPSTATUS=OFF
+ is_set $CONFIG_DHCP && DHCPSTATUS=ON || DHCPSTATUS=OFF
if [ "$(grep '^auto' /etc/network/interfaces | sed 's/ lo// ; s/auto// ; s/ //g')" != "" ] ; then
DHCPSTATUS=OFF
fi
if [ "$(grep '^auto' /etc/network/interfaces | sed 's/ lo// ; s/auto// ; s/ //g')" != "" ] ; then
DHCPSTATUS=OFF
fi
- grep -q '^CONFIG_FSTAB=.*yes' $AUTOCONFIG && FSTABSTATUS=ON || FSTABSTATUS=OFF
- grep -q '^CONFIG_CPU=.*yes' $AUTOCONFIG && CPUSTATUS=ON || CPUSTATUS=OFF
- grep -q '^CONFIG_ACPI_APM=.*yes' $AUTOCONFIG && ACPI_APMSTATUS=ON || ACPI_APMSTATUS=OFF
- grep -q '^CONFIG_SYSLOG=.*yes' $AUTOCONFIG && SYSLOGSTATUS=ON || SYSLOGSTATUS=OFF
- grep -q '^CONFIG_GPM=.*yes' $AUTOCONFIG && GPMSTATUS=ON || GPMSTATUS=OFF
+ is_set $CONFIG_FSTAB && FSTABSTATUS=ON || FSTABSTATUS=OFF
+ is_set $CONFIG_CPU && CPUSTATUS=ON || CPUSTATUS=OFF
+ is_set $CONFIG_ACPI_APM && ACPI_APMSTATUS=ON || ACPI_APMSTATUS=OFF
+ is_set $CONFIG_SYSLOG && SYSLOGSTATUS=ON || SYSLOGSTATUS=OFF
+ is_set $CONFIG_GPM && GPMSTATUS=ON || GPMSTATUS=OFF
If you do not know what to do at this stage just leave it untouched,
the defaults are the recommended values.
If you do not know what to do at this stage just leave it untouched,
the defaults are the recommended values.
-All the configuration happens in the file /etc/grml/autoconfig - you can
+All the configuration happens in the file /etc/grml/autoconfig.local - you can
edit it manually as well.
" 0 0 0 \
dhcp "check for network devices and run pump (get ip-address via DHCP)" $DHCPSTATUS \
edit it manually as well.
" 0 0 0 \
dhcp "check for network devices and run pump (get ip-address via DHCP)" $DHCPSTATUS \