X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=grml-terminalserver;h=3fcfa3713fb470b08cfabcc1297f2893e272ec2b;hb=393501a913872e87da98e57e33bc3d7bba8128a6;hp=d736a8c4d41f84d7694214237a4600c19ec75022;hpb=bad00fc6a58406f1e110bf9e5701ff6eee6c3a3b;p=grml-terminalserver.git diff --git a/grml-terminalserver b/grml-terminalserver index d736a8c..3fcfa37 100755 --- a/grml-terminalserver +++ b/grml-terminalserver @@ -66,8 +66,13 @@ EOT function killPortmapper { + if [ -f /etc/init.d/portmap ] ; then /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 {{{ @@ -204,12 +209,13 @@ function createTftpConf removeTftpConf 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 + if [ -r /usr/lib/PXELINUX/pxelinux.0 ] ; then + execute "install -m 644 /usr/lib/PXELINUX/pxelinux.0 $TFTPD_DATA_DIR_" die + else # older versions of syslinux-common (<= 2:4.05+dfsg-6+deb7u1): + execute "install -m 644 /usr/lib/syslinux/pxelinux.0 $TFTPD_DATA_DIR_" die + fi 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 fi [ -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 @@ -250,7 +256,13 @@ function removeNfsConfig 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 @@ -385,14 +397,12 @@ isExistent $DEFAULT_CONFIG_ die . $CONFIG_ # used config vars: # MOUNT_POINT_ -# KERNEL_IMAGE_ # MEMTEST_IMAGE_ # PXE_BOOT_MSG_ # PXE_BOOT_LOGO_ -if [[ $MOUNT_POINT_ == "" || $KERNEL_IMAGE_ == "" || $MEMTEST_IMAGE_ == "" || \ +if [[ $MOUNT_POINT_ == "" || $MEMTEST_IMAGE_ == "" || \ $PXE_BOOT_MSG_ == "" || $PXE_BOOT_MSG_ == "" ]]; then warn "MOUNT_POINT_=\"$MOUNT_POINT_\" \ -KERNEL_IMAGE_=\"$KERNEL_IMAGE_\" \ MEMTEST_IMAGE_=\"$MEMTEST_IMAGE_\" PXE_BOOT_MSG_=\"$PXE_BOOT_MSG_\" PXE_BOOT_LOGO_=\"$PXE_BOOT_LOGO_\"" @@ -426,7 +436,7 @@ fi 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