projects
/
grml-terminalserver.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Release new version 0.99.20
[grml-terminalserver.git]
/
grml-terminalserver
diff --git
a/grml-terminalserver
b/grml-terminalserver
index
3c6b07f
..
e8a3015
100755
(executable)
--- a/
grml-terminalserver
+++ b/
grml-terminalserver
@@
-66,8
+66,13
@@
EOT
function killPortmapper
{
function killPortmapper
{
+ if [ -f /etc/init.d/portmap ] ; then
/etc/init.d/portmap stop >/dev/null &>/dev/null
/etc/init.d/portmap stop >/dev/null &>/dev/null
- killall -9 portmap &>/dev/null
+ elif [ -f /etc/init.d/rpcbind ] ; then
+ /etc/init.d/rpcbind stop >/dev/null &>/dev/null
+ fi
+ killall -9 portmap &>/dev/null
+ killall -9 rpcbind &>/dev/null
}
# DHCP SERVICE {{{
}
# DHCP SERVICE {{{
@@
-110,8
+115,12
@@
function stopDhcp
{
start-stop-daemon --stop --quiet --pidfile "$DHCPD_PID_"
rm -f $DHCPD_PID_
{
start-stop-daemon --stop --quiet --pidfile "$DHCPD_PID_"
rm -f $DHCPD_PID_
+ # ugly but necessary :-/
find /var/lib/dhcp* -type f -name dhcpd.leases -delete
find /var/lib/dhcp* -type f -name dhcpd.leases -delete
- touch /var/lib/dhcp*/dhcpd.leases
+ local dhcpdir
+ for dhcpdir in /var/lib/dhcp* ; do
+ touch ${dhcpdir}/dhcpd.leases
+ done
}
function startDhcp
}
function startDhcp
@@
-201,15
+210,15
@@
function createTftpConf
execute "mkdir -p $TFTPD_DATA_DIR_/pxelinux.cfg" die
execute "install -m 644 /usr/lib/syslinux/pxelinux.0 $TFTPD_DATA_DIR_" die
execute "mkdir -p $TFTPD_DATA_DIR_/pxelinux.cfg" die
execute "install -m 644 /usr/lib/syslinux/pxelinux.0 $TFTPD_DATA_DIR_" die
- execute "install -m 644 $PATH_/
minirt26.gz
$TFTPD_DATA_DIR_" die
+ execute "install -m 644 $PATH_/
initrd.img
$TFTPD_DATA_DIR_" die
if [ -d "$MOUNT_POINT_"/boot/release ] ; then
cp -r "$MOUNT_POINT_"/boot/release "$TFTPD_DATA_DIR_"
else
if [ -d "$MOUNT_POINT_"/boot/release ] ; then
cp -r "$MOUNT_POINT_"/boot/release "$TFTPD_DATA_DIR_"
else
- execute "install -m 644 $KERNEL_IMAGE_ $TFTPD_DATA_DIR_/
linux26
" die
+ execute "install -m 644 $KERNEL_IMAGE_ $TFTPD_DATA_DIR_/
vmlinuz
" die
fi
fi
- execute "install -m 644 $MEMTEST_IMAGE_ $TFTPD_DATA_DIR_/memtest" die
+
[ -f "$MEMTEST_IMAGE" ] &&
execute "install -m 644 $MEMTEST_IMAGE_ $TFTPD_DATA_DIR_/memtest" die
execute "install -m 644 $PXE_BOOT_MSG_ $TFTPD_DATA_DIR_" die
execute "install -m 644 $PXE_BOOT_MSG_ $TFTPD_DATA_DIR_" die
- execute "install -m 644 $PXE_BOOT_LOGO_ $TFTPD_DATA_DIR_" die
+
[ -f "$PXE_BOOT_LOGO_" ] &&
execute "install -m 644 $PXE_BOOT_LOGO_ $TFTPD_DATA_DIR_" die
execute "source $TEMPLATE_CONFIG_DIR_/grub-pxelinux_config" die
}
execute "source $TEMPLATE_CONFIG_DIR_/grub-pxelinux_config" die
}
@@
-236,17
+245,23
@@
function runTftp
# NFS {{{
function createNfsConfig
{
# NFS {{{
function createNfsConfig
{
- execute "exportfs -o ro,no_root_squash,async,nohide $NETWORK_/$NETMASK_:$MOUNT_POINT_" warn
+ execute "exportfs -o ro,no_root_squash,async,nohide
,fsid=42
$NETWORK_/$NETMASK_:$MOUNT_POINT_" warn
}
function removeNfsConfig
{
}
function removeNfsConfig
{
- execute "exportfs -u -o ro,no_root_squash,async,nohide $NETWORK_/$NETMASK_:$MOUNT_POINT_" warn
+ execute "exportfs -u -o ro,no_root_squash,async,nohide
,fsid=42
$NETWORK_/$NETMASK_:$MOUNT_POINT_" warn
}
function startNfs
{
}
function startNfs
{
- /etc/init.d/portmap start
+ if [ -f /etc/init.d/portmap ] ; then
+ /etc/init.d/portmap start
+ elif [ -f /etc/init.d/rpcbind ] ; then
+ /etc/init.d/rpcbind start
+ else
+ echo "Warning: Could not start portmapper/rpcbind" >&2
+ fi
/etc/init.d/nfs-common start
# FIXME /etc/init.d/nfs-kernel-server start
$USR_SHARE_/nfs-kernel-server start
/etc/init.d/nfs-common start
# FIXME /etc/init.d/nfs-kernel-server start
$USR_SHARE_/nfs-kernel-server start
@@
-422,7
+437,7
@@
fi
if [ $check_necessary_files_ == 'yes' ]; then
# test for files absolutly necessary for grml-terminalserver and created from -config
problem_=0
if [ $check_necessary_files_ == 'yes' ]; then
# test for files absolutly necessary for grml-terminalserver and created from -config
problem_=0
- for i in $PATH_/
minirt26.gz
; do
+ for i in $PATH_/
initrd.img
; do
isExistent $i warn || problem_=1
done
if [ $problem_ -eq 1 ]; then
isExistent $i warn || problem_=1
done
if [ $problem_ -eq 1 ]; then