#!/bin/sh
# word expansion {..,..} works in bash but not sh shell, use for loop instead.
#ln -s /etc/init.d/initfile-local /etc/rc{0,1}.d/K20initfile-local
target=/etc/init.d/initfile-local
#The sh shell doesn't support word expanson well.
dirs="rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d"
for dir in $dirs
do echo $dir
link=/etc/$dir/K20initfile-local
ln -s $target $link
done
ls /etc/rc?.d/*initfile-local*
#rm /etc/rc?.d/*initfile-local*
#update-rc.d initfile-local disable/enable
"./ssr-local.sh" 25 lines, 808 characters written