US Robotics USR2410 Instrukcja Użytkownika Strona 83

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 107
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 82
71
Appe ndix C -
Autom ated Startup Code
Meshstart
#!/usr/bin/perl
# Check to see if there is a cd-rom drive is mountable and see if there is
# a meshstart.conf file on it.
$cdrom = `cat /proc/sys/dev/cdrom/info|grep \"drive name\"|sed \"s/.*:\\s*//\"`;
chomp($cdrom);
$path_to_config = "/home/mesh/meshstart";
if ($cdrom ne "")
{
print ("trying to mount cdrom on dev $cdrom");
$mounted = `mount -t iso9660 \/dev\/$cdrom \/mnt\/cdrom`;
$rc = $?;
print ("rc: $rc \n");
sleep(5);
if ($rc == 0)
{
if (-e "/mnt/cdrom/meshstart.conf")
{
$path_to_config = "/mnt/cdrom";
print ("Using configuration file on cdrom\n");
}
}
}
print ("Using $path_to_config/meshstart.conf as config file\n");
require "$path_to_config/meshstart.conf";
if ($cdrom ne "")
{
$mounted = `umount /mnt/cdrom`;
}
#----------------------------------------------------------------------#
# Start up script for our thesis project.
#
# Uses meshstart.conf which it assumes is in the same directory
#
# Sets up the following, in order:
#
# 1. configure the wireless cards:
# - configures the mesh device
# - if the CLIENT_DEV value is set in the config file, this
Przeglądanie stron 82
1 2 ... 78 79 80 81 82 83 84 85 86 87 88 ... 106 107

Komentarze do niniejszej Instrukcji

Brak uwag