diff options
-rwxr-xr-x | installer/opengnsys_update.sh | 7 | ||||
-rwxr-xr-x | server/bin/setclientmode | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index 127f3745..fa97882e 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -457,7 +457,12 @@ function updateServerFiles() done popd >/dev/null echoAndLog "${FUNCNAME}(): updating DHCP files" - perl -pi -e 's/pxelinux.0/grldr/' /etc/dhcp*/dhcpd*.conf + if grep -q 'pxelinux.0' /etc/dhcp*/dhcpd*.conf; then + perl -pi -e 's/pxelinux.0/grldr/' /etc/dhcp*/dhcpd*.conf + for i in isc-dhcp-server dhcpd3-server dhcpd; do + [ -f /etc/init.d/$i ] && /etc/init.d/$i restart + done + fi echoAndLog "${FUNCNAME}(): updating cron files" echo "* * * * * root [ -x $INSTALL_TARGET/bin/torrent-creator ] && $INSTALL_TARGET/bin/torrent-creator" > /etc/cron.d/torrentcreator echoAndLog "${FUNCNAME}(): server files updated successfully." diff --git a/server/bin/setclientmode b/server/bin/setclientmode index a934783e..f02dc72f 100755 --- a/server/bin/setclientmode +++ b/server/bin/setclientmode @@ -58,7 +58,7 @@ for AUX in $ETHERNET; do AUX="01-${AUX:0:2}-${AUX:2:2}-${AUX:4:2}-${AUX:6:2}-${AUX:8:2}-${AUX:10:2}" # Si existe anteriormente lo borra [ -e $PXEDIR/$AUX ] && rm $PXEDIR/$AUX - if [ "$1" != "default" ]; thenm + if [ "$1" != "default" ]; then cp -a $TEMPLATE $PXEDIR/$AUX mysql -u "$USUARIO" -p"$PASSWORD" -D "$CATALOG" -N -e \ "UPDATE ordenadores SET arranque=\"$1\" WHERE mac=\"$ETHERNET\";" |