Подскажите, где ошибка. Нужно из:
TTY=""
MOUNTPOINT=""
OPTIONS=""получить:
TTY="/dev/head"
MOUNTPOINT="/dev/ass"
OPTIONS=""
Находит почему-то только строку с MOUNTPOINT
Спасибо.
-----------------------------------------
#!/bin/sh -e
#
INITCONFFILE=~/owfs
# Generate configuration file if it does not exist, using default values.
[ -r "${INITCONFFILE}" ] || {
echo Generating ${INITCONFFILE}... >&2
cat >${INITCONFFILE} <<'EOFMAGICNUMBER1234'
#
TTY=""
MOUNTPOINT=""
OPTIONS=""
EOFMAGICNUMBER1234
}
MOUNTPOINT="/dev/ass"
MOUNTPOINT=$(echo "$MOUNTPOINT" | sed -e 's/\//\\\//g')
TMPFILE=~/owfs.dpkg-tmp
sed -i -e "s/^[[:space:]]*MOUNTPOINT[[:space:]]*=.*/MOUNTPOINT=\"$MOUNTPOINT\"/" \
${INITCONFFILE}
TTY="/dev/head"
TTY=$(echo "$TTY" | sed -e 's/\//\\\//g')
sed -i -e "s/^[[:space:]]*TTY[:space:]]*=.*/TTY=\"$TTY\"/" \
${INITCONFFILE}