Lines 368-374
Link Here
|
368 |
CONFIGFILE=/etc/suspend.conf |
368 |
CONFIGFILE=/etc/suspend.conf |
369 |
INITDIR=/etc/init.d |
369 |
INITDIR=/etc/init.d |
370 |
RLVLDIR=/etc/init.d |
370 |
RLVLDIR=/etc/init.d |
371 |
INSTALLDIR=/usr/local/sbin |
371 |
INSTALLDIR=${PREFIX}/sbin |
372 |
IFDOWN=/etc/init.d/net.eth0 |
372 |
IFDOWN=/etc/init.d/net.eth0 |
373 |
OPTDOWN=stop |
373 |
OPTDOWN=stop |
374 |
IFUP=/etc/init.d/net.eth0 |
374 |
IFUP=/etc/init.d/net.eth0 |
Lines 453-461
Link Here
|
453 |
} ' $0 >> $TMP |
453 |
} ' $0 >> $TMP |
454 |
|
454 |
|
455 |
if [ ! -d $INSTALLDIR ] ;then |
455 |
if [ ! -d $INSTALLDIR ] ;then |
456 |
echo "Directory $INSTALLDIR doesn't exist: installation aborted" |
456 |
mkdir -p "${INSTALLDIR}" |
457 |
rm $TMP |
|
|
458 |
exit 2 |
459 |
fi |
457 |
fi |
460 |
|
458 |
|
461 |
echo "Creating $INSTALLDIR/$BINNAME" |
459 |
echo "Creating $INSTALLDIR/$BINNAME" |
Lines 634-647
Link Here
|
634 |
SWSUSP_VT="9" |
632 |
SWSUSP_VT="9" |
635 |
EOF |
633 |
EOF |
636 |
if [ ! -f $CONFIGFILE -o "$FORCE" = "yes" ] ;then |
634 |
if [ ! -f $CONFIGFILE -o "$FORCE" = "yes" ] ;then |
637 |
echo "Creating file $CONFIGFILE" |
635 |
echo "Creating file ${PREFIX}/${CONFIGFILE}" |
638 |
mv $TMP $CONFIGFILE |
636 |
mkdir -p $(dirname "${PREFIX}/${CONFIGFILE}") |
|
|
637 |
mv "${TMP}" "${PREFIX}/${CONFIGFILE}" |
639 |
else |
638 |
else |
640 |
echo "Configuration file $CONFIGFILE exists: not overwritten" |
639 |
echo "Configuration file $CONFIGFILE exists: not overwritten" |
641 |
echo -e "These are the differences:\n" |
640 |
echo -e "These are the differences:\n" |
642 |
diff -u $CONFIGFILE $TMP |
641 |
diff -u $CONFIGFILE $TMP |
643 |
echo "Creating file $CONFIGFILE.new" |
642 |
echo "Creating file ${PREFIX}/${CONFIGFILE}.new" |
644 |
mv $TMP $CONFIGFILE.new |
643 |
mkdir -p $(dirname "${PREFIX}/${CONFIGFILE}.new") |
|
|
644 |
mv "${TMP}" "${PREFIX}/${CONFIGFILE}.new" |
645 |
fi |
645 |
fi |
646 |
|
646 |
|
647 |
exit 0 |
647 |
exit 0 |