@@ -127,7 +127,7 @@ def do_switch_root(self) -> str:
127
127
_find_init || rd_fail "Unable to find init." # Redefines init on success
128
128
init_target=$(readvar init)
129
129
fi
130
- einfo "Switching root to: $switch_root_Target $init_target"
130
+ einfo "Switching root to: $switch_root_target $init_target"
131
131
klog "[UGRD $(readvar VERSION)] Running init: $init_target"
132
132
einfo "Cleaning up /run/ugrd"
133
133
edebug "$(rm -rfv /run/ugrd)"
@@ -308,20 +308,20 @@ def klog(self) -> str:
308
308
def edebug (self ) -> str :
309
309
"""Returns a shell function like edebug."""
310
310
return r"""
311
- output="$(printf "%s " "${*}")"
311
+ output="$(printf "%b " "${*}")"
312
312
if check_var quiet; then
313
313
return
314
314
fi
315
315
if [ "$(readvar debug)" != "1" ]; then
316
316
return
317
317
fi
318
- printf "\033[1;34m *\033[0m %s \n" "${output}"
318
+ printf "\033[1;34m *\033[0m %b \n" "${output}"
319
319
"""
320
320
321
321
322
322
def einfo (self ) -> list [str ]:
323
323
"""Returns a shell function like einfo."""
324
- output = ['output="$(printf "%s " "${*}")"' ]
324
+ output = ['output="$(printf "%b " "${*}")"' ]
325
325
if "ugrd.base.plymouth" in self ["modules" ]:
326
326
output += [
327
327
"if plymouth --ping; then" ,
@@ -330,15 +330,15 @@ def einfo(self) -> list[str]:
330
330
"fi" ,
331
331
]
332
332
333
- output += ["if check_var quiet; then" , " return" , "fi" , r'printf "\033[1;32m *\033[0m %s \n" "${output}"' ]
333
+ output += ["if check_var quiet; then" , " return" , "fi" , r'printf "\033[1;32m *\033[0m %b \n" "${output}"' ]
334
334
return output
335
335
336
336
337
337
def ewarn (self ) -> list [str ]:
338
338
"""Returns a shell function like ewarn.
339
339
If plymouth is running, it displays a message instead of echoing.
340
340
"""
341
- output = ['output="$(printf "%s " "${*}")"' ]
341
+ output = ['output="$(printf "%b " "${*}")"' ]
342
342
if "ugrd.base.plymouth" in self ["modules" ]:
343
343
output += [
344
344
"if plymouth --ping; then" , # Always show the message if plymouth is running
@@ -351,14 +351,14 @@ def ewarn(self) -> list[str]:
351
351
"if check_var quiet; then" ,
352
352
" return" ,
353
353
"fi" ,
354
- r'printf "\033[1;33m *\033[0m %s \n" "${output}"' ,
354
+ r'printf "\033[1;33m *\033[0m %b \n" "${output}"' ,
355
355
]
356
356
return output
357
357
358
358
359
359
def eerror (self ) -> list [str ]:
360
360
"""Returns a shell function like eerror."""
361
- output = ['output="$(printf "%s " "${*}")"' ]
361
+ output = ['output="$(printf "%b " "${*}")"' ]
362
362
if "ugrd.base.plymouth" in self ["modules" ]:
363
363
output += [
364
364
"if plymouth --ping; then" ,
@@ -367,5 +367,5 @@ def eerror(self) -> list[str]:
367
367
"fi" ,
368
368
]
369
369
else :
370
- output += [r'printf "\033[1;31m *\033[0m %s \n" "${output}"' ]
370
+ output += [r'printf "\033[1;31m *\033[0m %b \n" "${output}"' ]
371
371
return output
0 commit comments