no debug from sub-scripts

Bug #1532663 reported by Jay Michael on 2016-01-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
casper (Ubuntu)
Medium
Unassigned

Bug Description

     Kernel boot parameter "debug=1" produces detailed console / log-file output tracing script execution. No details are provided for the execution of sub-scripts which are run in new shells.

     For instance, with "debug=1" on the kernel boot command line, there are details of variable expansions tracing execution of "casper" as it calls "run_scripts" to process the "casper-premount" directory, right up to the point where it runs "/scripts/casper-premount/ORDER". It uses the shell "source" command to run ORDER, so you see some indication that there is a line in ORDER that says "/scripts/casper-premount/20iso-scan", but since this line is running iso-scan as a command, instead of running it with a "source" command, it is being run in a new shell, and the "set -x" that "init" executed as a result of the "debug=1" parameter is lost, so there are no debug messages during the execution of 20iso-scan.

     I realize this extends beyond casper, but I think the only safe fix will involve adding code to every sub-script to reassert "set -x" if the kernel was given a "debug" parameter.

Ubuntu 14.04

Changed in casper (Ubuntu):
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers