Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add some error checking to pkg commands in pc-thinclient

  • Loading branch information...
commit b5e5e3e863e9fc85d1e217c562d6ed2a62caf55a 1 parent af7bd01
Kris Moore kmoore134 authored

Showing 1 changed file with 4 additions and 5 deletions. Show diff stats Hide diff stats

  1. +4 5 src-sh/pc-thinclient/pc-thinclient
9 src-sh/pc-thinclient/pc-thinclient
@@ -305,7 +305,7 @@ check_worldports() {
305 305 cp /usr/local/etc/pkg-pubkey.cert ${PXEWORLD}/usr/local/etc/
306 306
307 307 # Start by adding pcbsd-utils
308   - pkg -c ${PXEWORLD} install -y pcbsd-utils
  308 + rc_halt "pkg -c ${PXEWORLD} install -y pcbsd-utils"
309 309
310 310 # Remove old pc-sysinstall so we use new one in /usr/local/sbin
311 311 rm ${PXEWORLD}/usr/sbin/pc-sysinstall 2>/dev/null
@@ -316,11 +316,11 @@ check_worldports() {
316 316 if [ -e "${PXEWORLD}/usr/local/bin/xv" ] ; then return ; fi
317 317
318 318 # Install Xorg
319   - pkg -c ${PXEWORLD} install -y xorg
  319 + rc_halt "pkg -c ${PXEWORLD} install -y xorg"
320 320
321 321 # Need to install / use GDM on the base system
322 322 if [ ! -e "/usr/local/sbin/gdm" ] ; then
323   - pkg install -y gdm
  323 + rc_halt "pkg install -y gdm"
324 324 fi
325 325
326 326 # Disable PCDM since it doesn't do XDMCP
@@ -394,8 +394,7 @@ check_dhcpd() {
394 394 if [ "$?" = "0" ] ; then return; fi
395 395
396 396 echo "Installing $DHCPPORT"
397   - pkg install -y ${DHCPPORT}
398   - if [ "$?" != "0" ] ; then exit_err "Failed installing ${DHCPPORT}"; fi
  397 + rc_halt "pkg install -y ${DHCPPORT}"
399 398 }
400 399
401 400 # Function to display what information to add to external DHCP server

0 comments on commit b5e5e3e

Please sign in to comment.
Something went wrong with that request. Please try again.