esh: Migrate shell to /bin/esh

This commit is contained in:
K. Lange 2023-05-05 22:30:33 +09:00
parent 85e7a13607
commit f14bd21548
17 changed files with 26 additions and 19 deletions

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/esh
export-cmd DESKTOP cat /var/run/.wallpaper.pid

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/esh
if empty? "$1" then exec sh -c "echo 'usage: $0 WALLPAPER'"
if not stat -Lq "$1" then exec sh -c "echo '$0: $1 does not exist'"

View File

@ -96,7 +96,7 @@ int main(int argc, char * argv[]) {
prog_lines[i] = "msk count";
sprintf(data_lines[i++], C_A "Packages: " C_O);
prog_lines[i] = "sh -v";
prog_lines[i] = "esh -v";
sprintf(data_lines[i++], C_A "Shell: " C_O);
prog_lines[i] = "yutani-query resolution";

View File

@ -1,3 +1,3 @@
root:toor:0:0:Administrator:/home/root:/bin/sh:fancy
local:local:1000:1000:Local User:/home/local:/bin/sh:fancy
guest:guest:1001:1001:Guest User:/home/guest:/bin/sh:fancy
root:toor:0:0:Administrator:/home/root:/bin/esh:fancy
local:local:1000:1000:Local User:/home/local:/bin/esh:fancy
guest:guest:1001:1001:Guest User:/home/guest:/bin/esh:fancy

View File

@ -1,5 +1,5 @@
root:x:0:0:Administrator:/home/root:/bin/sh:fancy
root:x:0:0:Administrator:/home/root:/bin/esh:fancy
adm:x:1:1:Administrators:/tmp:/bin/false:nope
dialout:x:2:2:Serial Users:/tmp:/bin/false:nope
local:x:1000:1000:Local User:/home/local:/bin/sh:fancy
guest:x:1001:1001:Guest User:/home/guest:/bin/sh:fancy
local:x:1000:1000:Local User:/home/local:/bin/esh:fancy
guest:x:1001:1001:Guest User:/home/guest:/bin/esh:fancy

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/esh
# This daemonizes
exec splash-log

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/esh
if not kcmdline -q migrate then exit 0

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/esh
export-cmd HOSTNAME cat /etc/hostname

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/esh
echo -n "Mounting tmpfs..." > /dev/pex/splash
mount tmpfs tmp,777 /tmp

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/esh
echo -n "Installing device driver modules..." > /dev/pex/splash

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/esh
if not stat -Lq /dev/cdrom0 then exit 0

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/esh
if kcmdline -q no-startup-dhcp then exit 0

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/esh
if kcmdline -q no-startup-msk then exit 0

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/esh
export-cmd START kcmdline -g start

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/esh
# Start wallpaper
cd ~/Desktop

View File

@ -48,6 +48,12 @@ def file_filter(tarinfo):
return tarinfo
def symlink(file,target):
ti = tarfile.TarInfo(file)
ti.type = tarfile.SYMTYPE
ti.linkname = target
return ti
with tarfile.open('ramdisk.igz','w:gz') as ramdisk:
ramdisk.add('base',arcname='/',filter=file_filter)
@ -63,5 +69,6 @@ with tarfile.open('ramdisk.igz','w:gz') as ramdisk:
ramdisk.add('tags',arcname='/src/tags',filter=file_filter)
ramdisk.add('util/auto-dep.krk',arcname='/bin/auto-dep.krk',filter=file_filter)
ramdisk.add('kuroko/src/kuroko',arcname='/usr/include/kuroko',filter=file_filter)
ramdisk.addfile(symlink('bin/sh','esh'))