Good Morning,
I've written a script to enable console access through the serial port for a RHEL 5 installation. Everything works fine except for changing what systty points to. If I run the script, systty doesn't change. If I do the tasks by hand, it works. Any ideas?
Here is the portion of the script:
Code:
#!/bin/sh
DATE=`/bin/date +'%d%b%y'`
cd /etc/makedev.d
FIL=`grep systty * | cut -d: -f1`
sed -i.${DATE} 's/^\(ls*systty\s*\)0$/\1S0/' ${FIL}
cd /dev
rm systty
./MAKEDEV systty
The file is changed as expected, but systty doesn't point to ttyS0.