diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | debug.csh | 3 | ||||
-rw-r--r-- | debug.sh | 4 | ||||
-rw-r--r-- | initscripts.spec | 2 | ||||
-rw-r--r-- | mcheck.csh | 4 | ||||
-rw-r--r-- | mcheck.sh | 7 | ||||
-rw-r--r-- | sysconfig/debug (renamed from sysconfig/mcheck) | 8 |
7 files changed, 16 insertions, 16 deletions
@@ -28,7 +28,7 @@ install: install -m644 rwtab statetab networks $(ROOT)/etc install -m755 service setsysfont $(ROOT)/sbin install -m644 lang.csh lang.sh $(ROOT)/etc/profile.d - install -m644 mcheck.csh mcheck.sh $(ROOT)/etc/profile.d + install -m644 debug.csh debug.sh $(ROOT)/etc/profile.d install -m755 sys-unconfig $(ROOT)/usr/sbin install -m644 crypttab.5 $(ROOT)$(mandir)/man5 install -m644 service.8 sys-unconfig.8 $(ROOT)$(mandir)/man8 @@ -44,7 +44,7 @@ install: install -m755 -d $(ROOT)/etc/rc.d $(ROOT)/etc/sysconfig install -m755 rc.d/rc rc.d/rc.local rc.d/rc.sysinit $(ROOT)/etc/rc.d/ cp -af rc.d/init.d $(ROOT)/etc/rc.d/ - install -m755 sysconfig/mcheck sysconfig/init sysconfig/netconsole sysconfig/readonly-root $(ROOT)/etc/sysconfig/ + install -m755 sysconfig/debug sysconfig/init sysconfig/netconsole sysconfig/readonly-root $(ROOT)/etc/sysconfig/ cp -af sysconfig/network-scripts $(ROOT)/etc/sysconfig/ cp -af ppp udev NetworkManager event.d $(ROOT)/etc mkdir -p $(ROOT)/etc/ppp/peers diff --git a/debug.csh b/debug.csh new file mode 100644 index 00000000..a5d5df6c --- /dev/null +++ b/debug.csh @@ -0,0 +1,3 @@ +if ( -f /etc/sysconfig/debug ) then + eval `egrep -v '(^[:blank:]*#|\$RANDOM)' /etc/sysconfig/debug | sed 's|^export ||g' | sed 's|\([^=]*\)=\([^=]*\)|setenv \1 \2|g' | sed 's|$|;|'` +endif diff --git a/debug.sh b/debug.sh new file mode 100644 index 00000000..90af7cca --- /dev/null +++ b/debug.sh @@ -0,0 +1,4 @@ + +if [ -f /etc/sysconfig/debug ]; then + . /etc/sysconfig/debug +fi diff --git a/initscripts.spec b/initscripts.spec index a5d5b2f6..48acebb5 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -119,7 +119,7 @@ rm -rf $RPM_BUILD_ROOT %dir /etc/sysconfig/network-scripts %config(noreplace) %verify(not md5 mtime size) /etc/adjtime %config(noreplace) /etc/sysconfig/init -%config(noreplace) /etc/sysconfig/mcheck +%config(noreplace) /etc/sysconfig/debug %config(noreplace) /etc/sysconfig/netconsole %config(noreplace) /etc/sysconfig/readonly-root /etc/sysconfig/network-scripts/ifdown diff --git a/mcheck.csh b/mcheck.csh deleted file mode 100644 index 94149026..00000000 --- a/mcheck.csh +++ /dev/null @@ -1,4 +0,0 @@ - -if ( -f /etc/sysconfig/mcheck ) then - setenv MALLOC_CHECK_ = `grep "^MALLOC_CHECK_=" /etc/sysconfig/mcheck | cut -d"=" -f2` -endif diff --git a/mcheck.sh b/mcheck.sh deleted file mode 100644 index 35f076cf..00000000 --- a/mcheck.sh +++ /dev/null @@ -1,7 +0,0 @@ - -if [ -f /etc/sysconfig/mcheck ]; then - . /etc/sysconfig/mcheck - if [ -n "$MALLOC_CHECK_" ]; then - export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) - fi -fi diff --git a/sysconfig/mcheck b/sysconfig/debug index 94f35bd7..f0c05aae 100644 --- a/sysconfig/mcheck +++ b/sysconfig/debug @@ -1,9 +1,13 @@ - # MALLOC_CHECK_: should the system (libc) malloc check for memory errors? # Used values are: # unset: do not check # 0: silently ignore errors # 1: print diagnostics on stderr when an error is detected # 2: call abort when an error is detected -export MALLOC_CHECK_=1 +MALLOC_CHECK_=1 + +# MALLOC_PERTURB_: initialize cleared memory to the specified value +MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) +# Perform extra sanity checking in the gslice allocator +G_SLICE=debug-blocks |