@george1421 My fog.custominstall script
#!/bin/bash
. /usr/share/fog/lib/funcs.sh
echo "Running my script"
debugPause
if [[ ! -z $mac ]]; then
curl -A "" -Lkso /tmp/hinfo.sh ${web}/fog/service/hinfo.php -d "mac=$mac"
if [[ -f /tmp/hinfo.sh ]]; then
. /tmp/hinfo.sh
fi
fi
[[ -z $postdownpath ]] && postdownpath="/images/postdownloadscripts/"
case $osid in
5|6|7|9)
clear
[[ ! -d /ntfs ]] && mkdir -p /ntfs
getHardDisk
if [[ -z $hd ]]; then
handleError "Could not find hdd to use"
fi
getPartitions $hd
for part in $parts; do
umount /ntfs >/dev/null 2>&1
fsTypeSetting "$part"
case $fstype in
ntfs)
dots "Testing partition $part"
ntfs-3g -o force,rw $part /ntfs
ntfsstatus="$?"
if [[ ! $ntfsstatus -eq 0 ]]; then
echo "Skipped"
continue
fi
if [[ ! -d /ntfs/windows && ! -d /ntfs/Windows && ! -d /ntfs/WINDOWS ]]; then
echo "Not found"
umount /ntfs >/dev/null 2>&1
continue
fi
echo "Success"
break
;;
*)
echo " * Partition $part not NTFS filesystem"
;;
esac
done
if [[ ! $ntfsstatus -eq 0 ]]; then
echo "Failed"
debugPause
handleError "Failed to mount $part ($0)\n Args: $*"
fi
echo "Done"
debugPause
. ${postdownpath}fog.updateregbarcode
umount /ntfs
;;
*)
echo "Non-Windows Deployment"
debugPause
return
;;
esac
I went through and tried both wget and curl solutions.
This one gave me errors. I am running 1.5.9 and here states that curl should be used after 1.4.1
if [[ ! -z $mac ]]; then
wget -q -O /tmp/hinfo.txt "http://${web}service/hostinfo.php?mac=$mac"
if [[ -f /tmp/hinfo.txt ]]; then
. /tmp/hinfo.txt
fi
fi
For this one, I don’t get an error.
if [[ ! -z $mac ]]; then
curl -A "" -Lkso /tmp/hinfo.sh ${web}/fog/service/hinfo.php -d "mac=$mac"
if [[ -f /tmp/hinfo.sh ]]; then
. /tmp/hinfo.sh
fi
fi
This is what is in /tmp/hinfo.sh. It is pulling my web login page.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Login</title><link href="../management/css/animate.min.css?ver=135" rel="stylesheet" type="text/css"/><link href="../management/css/font-awesome.min.css?ver=135" rel="stylesheet" type="text/css"/><link href="../management/css/jquery-ui.css?ver=135" rel="stylesheet" type="text/css"/><link href="../management/css/jquery-ui.theme.css?ver=135" rel="stylesheet" type="text/css"/><link href="../management/css/jquery-ui.structure.css?ver=135" rel="stylesheet" type="text/css"/><link href="../management/css/jquery-ui-timepicker-addon.css?ver=135" rel="stylesheet" type="text/css"/><link href="../management/css/select2.min.css?ver=135" rel="stylesheet" type="text/css"/><link href="../management/css/bootstrap.min.css?ver=135" rel="stylesheet" type="text/css"/><link href="../management/css/bootstrap-theme.min.css?ver=135" rel="stylesheet" type="text/css"/><link href="../management/css/theme.bootstrap_3.css?ver=135" rel="stylesheet" type="text/css"/><link href="../management/css/theme.blue.css?ver=135" rel="stylesheet" type="text/css"/><link href="../management/css/bootstrap-dialog.min.css?ver=135" rel="stylesheet" type="text/css"/><link href="../management/css/default/fog.css?ver=135" rel="stylesheet" type="text/css"/><link rel="shortcut icon" href="../favicon.ico" type="image/x-icon"/></head><body><nav class="navbar navbar-inverse navbar-fixed-top"><div class="container-fluid"><div class="navbar-header"><button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse"><span class="sr-only">Toggle Navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button></div><div class="collapse navbar-collapse"><ul class="nav navbar-nav"><a class="navbar-brand" href="../management/index.php?node=home"><b>FOG</b> Project</a></ul></div></div></nav><div class="container-fluid dashboard"><div class="form-signin"><form class="form-horizontal" method="post" action="?node=home"><h3 class="form-signin-heading text-center"><span class="col-xs-1"><img src="../favicon.ico" class="logoimg" alt="Open Source Computer Cloning Solution"/></span>FOG Project</h3><hr/><div class="form-group"><label class="control-label col-md-2" for="uname">Username</label><div class="col-md-10"><input type="text" class="form-control" name="uname" required="" autofocus="" id="uname"/></div></div><div class="form-group"><label class="control-label col-md-2" for="upass">Password</label><div class="col-md-10"><input type="password" class="form-control" name="upass" required="" id="upass"/></div></div><div class="form-group"><label class="control-label col-md-2" for="ulang">Language</label><div class="col-md-10"><select class="form-control" name="ulang" id="ulang"><option value="中国的">中国的</option><option value="English" selected>English</option><option value="Español">Español</option><option value="Français">Français</option><option value="Deutsch">Deutsch</option><option value="Italiano">Italiano</option><option value="Português">Português</option></select></div></div><div class="form-group"><div class="col-md-offset-2 col-md-10"><button class="btn btn-default btn-block" type="submit" name="login">Login</button></div></div></form><hr/><div class="row"><div class="form-group"><div id="login-form-info"><p>Estimated FOG Sites: <b><i class="icon fa fa-circle-o-notch fa-spin fa-fw"></i></b></p><p>Latest Version: <b><i class="icon fa fa-circle-o-notch fa-spin fa-fw"></i></b></p><p>Latest Development Version: <b><i class="icon fa fa-circle-o-notch fa-spin fa-fw"></i></b></p></div></div></div></div></div><div class="collapse navbar-collapse"><footer class="footer"><nav class="navbar navbar-inverse navbar-fixed-bottom"><div class="container-fluid"><ul class="nav navbar-nav"><li><a href="https://wiki.fogproject.org/wiki/index.php?title=Credits">Credits</a></li><li><a href="?node=client">FOG Client</a></li><li><a href="https://www.paypal.com/cgi-bin/webscr?item_name=Donation+to+FOG+-+A+Free+Cloning+Solution&cmd=_donations&business=fogproject.org@gmail.com" target="_blank">Donate to FOG</a></li></ul></div></nav></footer></div><script src="js/jquery-latest.min.js?ver=135" type="text/javascript"></script><script src="js/jquery.validate.min.js?ver=135" type="text/javascript"></script><script src="js/additional-methods.min.js?ver=135" type="text/javascript"></script><script src="js/jquery.tablesorter.combined.js?ver=135" type="text/javascript"></script><script src="js/select2.min.js?ver=135" type="text/javascript"></script><script src="js/jquery-migrate-latest.min.js?ver=135" type="text/javascript"></script><script src="js/jquery.progressbar.js?ver=135" type="text/javascript"></script><script src="js/jquery.tmpl.js?ver=135" type="text/javascript"></script><script src="js/jquery.placeholder.js?ver=135" type="text/javascript"></script><script src="js/jquery-ui.min.js?ver=135" type="text/javascript"></script><script src="js/flot/jquery.flot.js?ver=135" type="text/javascript"></script><script src="js/flot/jquery.flot.time.js?ver=135" type="text/javascript"></script><script src="js/flot/jquery.flot.pie.js?ver=135" type="text/javascript"></script><script src="js/flot/jquery.flot.JUMlib.js?ver=135" type="text/javascript"></script><script src="js/flot/jquery.flot.gantt.js?ver=135" type="text/javascript"></script><script src="js/jquery-ui-timepicker-addon.js?ver=135" type="text/javascript"></script><script src="js/bootstrap.min.js?ver=135" type="text/javascript"></script><script src="js/bootstrap-dialog.min.js?ver=135" type="text/javascript"></script><script src="js/fog/fog.js?ver=135" type="text/javascript"></script><script src="js/jscolor.min.js?ver=135" type="text/javascript"></script><script src="js/fog/fog.login.js?ver=135" type="text/javascript"></script><!-- Memory Usage: 4.00 MiB--><!-- Memory Peak: 5.46 MiB--></body></html>