Skip to content

Commit

Permalink
Updating the config saves to /etc/fstab
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Oct 12, 2024
1 parent 53fe7a0 commit c1ae154
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/only-throw-error */
import type { Backend, OptionsOf } from '@zenfs/core';
import { Fetch, InMemory, mounts, Overlay, Port } from '@zenfs/core';
import fs, { Fetch, InMemory, mounts, Overlay, Port } from '@zenfs/core';
import { WebAccess, WebStorage, IndexedDB } from '@zenfs/dom';
import { Iso } from '@zenfs/iso';
import { Zip } from '@zenfs/zip';
Expand Down Expand Up @@ -252,8 +252,10 @@ $('#config .add').on('click', createNewMountConfig);

$('#config .update').on('click', () => {
const configs = parseConfig();
console.log(configs);
console.log(toFSTable(configs));
if (!fs.existsSync('/etc')) {
fs.mkdirSync('/etc');
}
fs.writeFileSync('/etc/fstab', toFSTable(configs));
});

$('#config .download').on('click', () => {
Expand Down

0 comments on commit c1ae154

Please sign in to comment.