use strict; use warnings; my $here=</dev/null 2>&1; then echo "$0: ltps is already running" exit 0 fi HERE my $file = do { local $/; }; $file =~ s/^(if.*?rctladm\.conf.*?fi$)/$1\n$here/ms; print $file; __DATA__ # Run rctladm to configure system resource controls based on the settings # previously saved by rctladm. See rctladm(1m) for instructions on how to # modify resource control settings. # if [ -f /etc/rctladm.conf ] && [ -x /usr/sbin/rctladm ]; then /usr/sbin/rctladm -u fi