+unlink $templog;
+Installcheck::Run::cleanup();
+
+#check order script
+$testconf = Installcheck::Run::setup();
+$testconf->add_param('autolabel', '"TESTCONF%%" empty volume_error');
+
+$testconf->add_dle(<<EODLE);
+localhost diskname2 $diskname {
+ installcheck-test
+ program "APPLICATION"
+ application {
+ plugin "amgtar"
+ property "atime-preserve" "no"
+ }
+ script {
+ plugin "amlog-script"
+ execute-where client
+ execute-on pre-host-amcheck
+ property "logfile" "$templog"
+ property "TEXT" "50"
+ order 50
+ }
+ script {
+ plugin "amlog-script"
+ execute-where client
+ execute-on pre-host-amcheck
+ property "logfile" "$templog"
+ property "TEXT" "60"
+ order 60
+ }
+ script {
+ plugin "amlog-script"
+ execute-where client
+ execute-on pre-host-amcheck
+ property "logfile" "$templog"
+ property "TEXT" "40"
+ order 40
+ }
+}
+EODLE
+$testconf->write();
+
+unlink $templog;
+ok(run('amcheck', '-c', 'TESTCONF'), "amcheck runs successfully for ordered scripts.");
+
+verify_log("amcheck invokes script in correct order",
+ "check TESTCONF pre-host-amcheck client localhost diskname2 $diskname 40",
+ "check TESTCONF pre-host-amcheck client localhost diskname2 $diskname 50",
+ "check TESTCONF pre-host-amcheck client localhost diskname2 $diskname 60",
+);
+
+