US Robotics USR2410 Manuale di Installazione Pagina 60

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 67
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 59
56 6. Manual System Configuration
if [ −r "$PATTERNS" ]; then
for PATTERN in $(cat $PATTERNS); do
case $ADDRESS in
($PATTERN)
PROFILE_NEW=$PROFILE
break 2
;;
esac
done
done
echo −n "Switching to profile "$PROFILE_NEW": "
#Ifthe new and current profiles are the same, exit here
["$PROFILE_NEW" != "$PROFILE_CUR" ] || exit 0
#Run the Stop−Scripts for the current profile
cd $PROFILE_DIR/$PROFILE_CUR/rc.d
for SCRIPT in $(echo "K[0−9][0−9]*"); do
if [ −n "$SCRIPT" ]; then
echo −n "."
case "$SCRIPT" in
(*.sh)
/bin/sh ./$SCRIPT stop &> /dev/null
;;
(*)
./$SCRIPT stop &> /dev/null
;;
esac
done
#Copy all profile specific files for the new profile
cd $PROFILE_DIR/$PROFILE_NEW/files.d
tar cf − . | (cd /; tar xf −)
#Run Start−Scripts for the new profile
cd $PROFILE_DIR/$PROFILE_NEW/rc.d
for SCRIPT in $(echo "S[0−9][0−9]*"); do
if [ −n "$SCRIPT" ]; then
echo −n "."
case "$SCRIPT" in
(*.sh)
/bin/sh ./$SCRIPT start &> /dev/null
;;
(*)
./$SCRIPT start &> /dev/null
;;
esac
done
#Save new profile
echo $PROFILE_CUR" −−> "$PROFILE_NEW > $PROFILE_STATE_FILE
echo " done."
/usr/local/packages/network/bin/profile-deselect:
#!/bin/sh
PROFILE_DIR="/etc/network/profiles"
PROFILE_STATE_FILE="/var/run/network/profile"
#Load the current and new profile
PROFILE_CUR=‘cat $PROFILE_STATE_FILE | awk ’{print $3}’‘
PROFILE_NEW="offline"
echo −n "Switching to profile "$PROFILE_NEW": "
#Ifthe new and current profiles are the same, exit here
["$PROFILE_NEW" != "$PROFILE_CUR" ] || exit 0
#Run Stop−Scripts for the current profile
cd $PROFILE_DIR/$PROFILE_CUR/rc.d
for SCRIPT in $(echo K[0−9][0−9]*); do
if [ −n "$SCRIPT" ]; then
echo −n "."
Vedere la pagina 59
1 2 ... 55 56 57 58 59 60 61 62 63 64 65 66 67

Commenti su questo manuale

Nessun commento