Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar.sh 2016 2016-08-11 13:02:01Z raphael.pion $
|
2 |
# $Id: alcasar.sh 2032 2016-08-15 16:18:45Z richard $
|
3 |
|
3 |
|
4 |
# alcasar.sh
|
4 |
# alcasar.sh
|
5 |
|
5 |
|
6 |
# ALCASAR Install script - CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...]
|
6 |
# ALCASAR Install script - CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...]
|
7 |
# Ce programme est un logiciel libre ; This software is free and open source
|
7 |
# Ce programme est un logiciel libre ; This software is free and open source
|
Line 1155... |
Line 1155... |
1155 |
chmod a+x /etc/init.d/chilli
|
1155 |
chmod a+x /etc/init.d/chilli
|
1156 |
ln -s /etc/init.d/chilli /usr/libexec/chilli
|
1156 |
ln -s /etc/init.d/chilli /usr/libexec/chilli
|
1157 |
# conf file creation
|
1157 |
# conf file creation
|
1158 |
[ -e /etc/chilli.conf.default ] || cp /etc/chilli.conf /etc/chilli.conf.default
|
1158 |
[ -e /etc/chilli.conf.default ] || cp /etc/chilli.conf /etc/chilli.conf.default
|
1159 |
#NTP Option configuration for DHCP
|
1159 |
#NTP Option configuration for DHCP
|
- |
|
1160 |
#DHCP Options : rfc2132
|
- |
|
1161 |
#dhcp option value will be convert in hexa.
|
- |
|
1162 |
#NTP option (or 'option 42') is like :
|
- |
|
1163 |
#
|
- |
|
1164 |
# Code Len Address 1 Address 2
|
- |
|
1165 |
# +-----+-----+-----+-----+-----+-----+-----+-----+--
|
- |
|
1166 |
# | 42 | n | a1 | a2 | a3 | a4 | a1 | a2 | ...
|
- |
|
1167 |
# +-----+-----+-----+-----+-----+-----+-----+-----+--
|
- |
|
1168 |
#
|
- |
|
1169 |
#Code : 42 => 2a
|
- |
|
1170 |
#Len : 4 => 04
|
1160 |
PRIVATE_IP_HEXA=$(printf "%02x\n" $(echo $PRIVATE_IP | cut -d'.' -f1))$(printf "%02x\n" $(echo $PRIVATE_IP | cut -d'.' -f2))$(printf "%02x\n" $(echo $PRIVATE_IP | cut -d'.' -f3))$(printf "%02x\n" $(echo $PRIVATE_IP | cut -d'.' -f4))
|
1171 |
PRIVATE_IP_HEXA=$(printf "%02x\n" $(echo $PRIVATE_IP | cut -d'.' -f1))$(printf "%02x\n" $(echo $PRIVATE_IP | cut -d'.' -f2))$(printf "%02x\n" $(echo $PRIVATE_IP | cut -d'.' -f3))$(printf "%02x\n" $(echo $PRIVATE_IP | cut -d'.' -f4))
|
1161 |
cat <<EOF > /etc/chilli.conf
|
1172 |
cat <<EOF > /etc/chilli.conf
|
1162 |
# coova config for ALCASAR
|
1173 |
# coova config for ALCASAR
|
1163 |
cmdsocket /var/run/chilli.sock
|
1174 |
cmdsocket /var/run/chilli.sock
|
1164 |
unixipc chilli.$INTIF.ipc
|
1175 |
unixipc chilli.$INTIF.ipc
|