summaryrefslogtreecommitdiffstats
path: root/reconfig.init
blob: b272f0a461b6fedfae40b20ce8deae3559330221 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
#
# reconfig		This scripts runs the system reconfig program
#
# chkconfig: 345 06 95
# description: 	If /etc/reconfigSys exists, run the reconfiguration
#		program and remove /etc/reconfigSys when done.
#
#               Also will run if 'reconfig' is on the kernel cmdline.
#
# Source function library.
. /etc/init.d/functions
[ -f /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
export LANG

RETVAL=$?

#
# this is required to avoid system logging intercepting input/output
# action on
#

case "$1" in
 start)
        if grep -i reconfig /proc/cmdline >/dev/null || [ -f /etc/reconfigSys ]; then
	    echo -n "Running system reconfiguration tool"
	    /usr/sbin/anaconda --reconfig
	    rm -f /etc/reconfigSys
	fi

	# We don't want to run this on random runlevel changes.
	touch /var/lock/subsys/reconfig

	;;
 stop)
 	rm -f /var/lock/subsys/reconfig
 	;;
 *)
 	echo "Usage: reconfig {start|stop}"
	exit 1
	;;
esac

exit $RETVAL