Skip to content

Commit d4aa3f3

Browse files
author
artisan
committed
pulizia
1 parent 8fe0262 commit d4aa3f3

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/classes/ovary.d/make-efi.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export async function makeEfi(this: Ovary, theme = 'eggs') {
5656

5757
if (!fs.existsSync(GAE)) {
5858
if (this.familyId === 'debian') {
59-
console.log(`error: cannot find ${GAE}`)
59+
Utils.error(`error: ${GAE} does not exist`)
6060
if (!Utils.isi686()) {
6161
process.exit(1)
6262
}
@@ -193,7 +193,7 @@ export async function makeEfi(this: Ovary, theme = 'eggs') {
193193
}
194194

195195
if (!fs.existsSync(splashSrc)) {
196-
Utils.warning('Cannot find: ' + splashSrc)
196+
Utils.warning(`warning: ${splashSrc} does not exists`)
197197
process.exit(1)
198198
}
199199
await exec(`cp ${splashSrc} ${splashDest}`, this.echo)
@@ -207,7 +207,7 @@ export async function makeEfi(this: Ovary, theme = 'eggs') {
207207
// copy theme
208208
const themeDest = `${isoDir}/boot/grub/theme.cfg`
209209
if (!fs.existsSync(themeSrc)) {
210-
Utils.warning('Cannot find: ' + themeSrc)
210+
Utils.error(`error: ${themeSrc} does not exist`)
211211
process.exit(1)
212212
}
213213
fs.copyFileSync(themeSrc, themeDest)
@@ -237,7 +237,7 @@ export async function makeEfi(this: Ovary, theme = 'eggs') {
237237
}
238238

239239
if (!fs.existsSync(grubTemplate)) {
240-
Utils.warning('Cannot find: ' + grubTemplate)
240+
Utils.error(`error: ${grubTemplate} does not exist`)
241241
process.exit(1)
242242
}
243243

@@ -321,7 +321,7 @@ function srcGAE(): string {
321321
function srcGAES(): string {
322322
let signedGrub = `/usr/lib/grub/${Utils.uefiFormat()}-signed/${nameGAES()}`;
323323
if (!fs.existsSync(signedGrub)) {
324-
Utils.warning(`cannot find ${signedGrub}`)
324+
Utils.warning(`warning: ${signedGrub} does not exist`)
325325
}
326326
return signedGrub
327327
}

src/classes/ovary.d/user-create-live.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export async function userCreateLive(this: Ovary) {
125125
}
126126
const o = yaml.load(fs.readFileSync(usersConf, 'utf8')) as IUserCalamares
127127
for (const group of o.defaultGroups) {
128-
const groupExists = (await exec(`chroot ${this.settings.work_dir.merged} getent group ${group} ${this.toNull}`)).code === 0;
128+
const groupExists = (await exec(`chroot ${this.settings.work_dir.merged} getent group ${group}`, {echo:false})).code === 0
129129
if (groupExists) {
130130
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG ${group} ${this.settings.config.user_opt} ${this.toNull}`, this.verbose))
131131
}

src/krill/classes/sequence.d/add_user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export default async function addUser(this: Sequence, username = 'live', passwor
7878
}
7979
const o = yaml.load(fs.readFileSync(usersConf, 'utf8')) as IUserCalamares
8080
for (const group of o.defaultGroups) {
81-
const groupExists = (await exec(`chroot ${this.installTarget} getent group ${group} ${this.toNull}`)).code === 0;
81+
const groupExists = (await exec(`chroot ${this.settings.work_dir.merged} getent group ${group}`, {echo:false})).code === 0
8282
if (groupExists) {
8383
await exec(`chroot ${this.installTarget} usermod -aG ${group} ${username} ${this.toNull}`)
8484
} else {

0 commit comments

Comments
 (0)