previous up next contents
Previous: qyw_docs_samba Up: Batches spécifiques Next: qyy_docs_strip   Contents

qyx_docs_runlevels


#! /bin/bash

cd /etc/init.d
all=/tmp/all_init_d
sed_file=/tmp/sed_file
tmp=/tmp/tmp_file
doc=/home/douillet/docs/sys/doc_runlevel_`echo $HOSTNAME | head -c 3`

find . -mindepth 2 | sed -e "s¶$¶X¶ ; s¶reboot¶halt¶ ; /killed/ d " > $all

cat <<EOF > $sed_file
s¶/boot.d/¶/rcB.d/¶
s¶^....¶¶
s¶.d/¶_¶

EOF

i=junkbuster
echo "`echo "$i                        a" | head -c 20`" `grep $i\X $all | sed -f $sed_file | sed -e "s¶$i\X¶¶" | tr "\n\r" "  "`


 for j in `find . -type f -maxdepth  1 | sort`
  do i=`echo $j | sed -e "s¶^..¶¶"`

 echo "`echo "$i                          a" | head -c 20`"`grep $i\X $all | sort | sed -f $sed_file | sed -e "s¶$i\X¶¶" | tr "\n\r" "  "`

 done > $tmp

cat <<EOF > $sed_file

s¶personal-firewall.fi¶perso_fire.fi       ¶
s¶personal-firewall.in¶perso_fire.in       ¶


/1_K/!  {
s¶^[^ ]*[ ]*¶&_____ ¶

}

/1_S/!  {
s¶^[^ ]*[ ]*..... ¶&_____ ¶

}

/2_K/!  {
s¶^[^ ]*[ ]*..... ..... ¶&_____ ¶

}

/2_S/!  {
s¶^[^ ]*[ ]*..... ..... ..... ¶&_____ ¶

}

/3_K/!  {
s¶^[^ ]*[ ]*..... ..... ..... ..... ¶&_____ ¶

}

/3_S/!  {
s¶^[^ ]*[ ]*..... ..... ..... ..... ..... ¶&_____ ¶

}


/4_K/!  {
s¶^[^ ]*[ ]*..... ..... ..... ..... ..... ..... ¶&_____ ¶

}

/4_S/!  {
s¶^[^ ]*[ ]*..... ..... ..... ..... ..... ..... ..... ¶&_____ ¶

}


/5_K/!  {
s¶^[^ ]*[ ]*..... ..... ..... ..... ..... ..... ..... ..... ¶&_____ ¶

}

/5_S/!  {
s¶^[^ ]*[ ]*..... ..... ..... ..... ..... ..... ..... ..... ..... ¶&_____ ¶

}

s/_____/     /g

EOF

sed -f $sed_file $tmp > $doc

# rm $all $sed_file $tmp


if test ! -z $1 
  then kedit $doc
fi

#
#
#
#
#
#
#


previous up next contents
Previous: qyw_docs_samba Up: Batches spécifiques Next: qyy_docs_strip   Contents


douillet@ensait.fr
2003-06-24