package posadka import ( "path/filepath" ) func EmptyRootPassword(prefix string) error { path := filepath.Join(prefix, "etc/passwd") return ReplaceInFile( path, []byte("root:x:"), []byte("root::"), ) } func EnableSystemRequest(prefix string) error { //579 # Enable System Request debugging of the kernel //580 if [ "$SYSRQ" != "" ]; then //581 echo "= Enabling System Request debugging of the kernel." //582 cat >> ${PREFIX}/etc/sysctl.d/arm-image-installer-sysrq.conf <<-EOH //583 # Controls the System Request debugging functionality of the kernel //584 kernel.sysrq = 1 //585 EOH //586 fi return nil } func ShowBoot(prefix string) error { path := filepath.Join(prefix, "etc/passwd") //# remove quiet from kargs //if [ "$SHOWBOOT" != "" ]; then // sed -i 's|rhgb quiet ||g' /tmp/boot/loader/entries/*.conf //fi return ReplaceInFile( path, []byte("rhgb quiet "), []byte(""), ) return nil }