isci: PATH=/usr/scripts
This commit is contained in:
parent
5fb0ee8bd5
commit
e898a83b05
4 changed files with 10 additions and 14 deletions
7
gestion/iscsi/get_volume_mapping.py
Normal file → Executable file
7
gestion/iscsi/get_volume_mapping.py
Normal file → Executable file
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python
|
#!/bin/bash /usr/scripts/python.sh
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# slon-get-volume-mapping.py
|
# slon-get-volume-mapping.py
|
||||||
|
@ -17,9 +17,8 @@ import sys
|
||||||
|
|
||||||
coding = "utf-8"
|
coding = "utf-8"
|
||||||
|
|
||||||
sys.path.append("/usr/scripts/gestion")
|
from gestion.config import ISCSI_MAP_FILE
|
||||||
from config import ISCSI_MAP_FILE
|
from gestion import affich_tools
|
||||||
import affich_tools
|
|
||||||
|
|
||||||
def get_mapping(baie_name):
|
def get_mapping(baie_name):
|
||||||
map_file = ISCSI_MAP_FILE % (baie_name,)
|
map_file = ISCSI_MAP_FILE % (baie_name,)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python
|
#!/bin/bash /usr/scripts/python.sh
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# udev-get-iscsi-name.py
|
# udev-get-iscsi-name.py
|
||||||
|
@ -12,8 +12,7 @@ pour les liens symboliques pour les périphériques iscsi'''
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
sys.path.append("/usr/scripts/gestion")
|
from gestion.config import ISCSI_MAP_FILE
|
||||||
from config import ISCSI_MAP_FILE
|
|
||||||
|
|
||||||
def getname(device, baie):
|
def getname(device, baie):
|
||||||
map_file = ISCSI_MAP_FILE % (baie,)
|
map_file = ISCSI_MAP_FILE % (baie,)
|
||||||
|
|
6
gestion/iscsi/udev_update_symlinks.py
Normal file → Executable file
6
gestion/iscsi/udev_update_symlinks.py
Normal file → Executable file
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python
|
#!/bin/bash /usr/scripts/python.sh
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Auteur : Pierre-Elliott Bécue <becue@crans.org>
|
# Auteur : Pierre-Elliott Bécue <becue@crans.org>
|
||||||
|
@ -7,9 +7,7 @@
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
sys.path.append('/usr/scripts/gestion/iscsi')
|
from gestion.affich_tools import coul
|
||||||
sys.path.append('/usr/scripts/gestion')
|
|
||||||
from affich_tools import coul
|
|
||||||
import udev_get_iscsi_name as ugin
|
import udev_get_iscsi_name as ugin
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,8 @@ exec_cmd() {
|
||||||
}
|
}
|
||||||
|
|
||||||
exec_cmd "Récupération du mapping lun<->nom de volume" \
|
exec_cmd "Récupération du mapping lun<->nom de volume" \
|
||||||
python /usr/scripts/gestion/iscsi/get_volume_mapping.py nols
|
/usr/scripts/gestion/iscsi/get_volume_mapping.py nols
|
||||||
python /usr/scripts/gestion/iscsi/get_volume_mapping.py slon
|
/usr/scripts/gestion/iscsi/get_volume_mapping.py slon
|
||||||
|
|
||||||
exec_cmd "Rechargement des règles de udev" \
|
exec_cmd "Rechargement des règles de udev" \
|
||||||
invoke-rc.d udev reload
|
invoke-rc.d udev reload
|
||||||
|
@ -38,4 +38,4 @@ exec_cmd "Rescan des volumes iscsi" \
|
||||||
iscsiadm -m session --rescan
|
iscsiadm -m session --rescan
|
||||||
|
|
||||||
exec_cmd "Mises à jours des liens symboliques dans /dev" \
|
exec_cmd "Mises à jours des liens symboliques dans /dev" \
|
||||||
python /usr/scripts/gestion/iscsi/udev_update_symlinks.py --clean
|
/usr/scripts/gestion/iscsi/udev_update_symlinks.py --clean
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue